Skip to content

CyrilWaechter/freecad-stubs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
out
 
 
 
 
 
 
 
 

freecad-stubs project

This project use mypy.stubgen to generate stubs for FreeCAD modules

Usage

  1. Clone repo : git clone https://github.com/CyrilWaechter/freecad-stubs.git
  2. Make sure your IDE check /out for stubs. eg. for vscode/code-oss you can create an .env file at workspace root to allow your linter / auto-completer (eg. pylint / jedi)
FREECAD_LIB=/usr/lib/freecad/lib
FREECAD_STUBS=/home/<user>/git/freecad-stubs/out
PYTHONPATH=${FREECAD_STUBS}:${FREECAD_LIB}:${PYTHONPATH}

Context

This stubs generator was developed as part of a FreeCAD community effort to make development around FreeCAD easier. See :

You might also want to checkout Vanuan / freecad-python-stubs which might superseed this repository at some point.

Known issues

  • Do not generate stubs for some submodules :
    • FreeCAD.Units
  • Generated types are mainly not accurate

About

FreeCAD stubs generated using mypy.stubgen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published