Programatically untype your Python Projects.
The original idea and code of this project comes from the following Stack OverFlow thread.
pip install pyuntype
Use the following command to completely untype your Python Project located in the src/
folder.
pyuntype src/ dest/
When --gitmode=True
, the src
directory should be a inside a Git repository. The goal to create a dest
folder only with the files listed by git ls-files
(and thus taking into account .gitignore
)
If you defined in your code a file with custom types, all imports from this file will be ignored, and this file won't be copied in your dest
directory
For the Python CLI, we can use:
pyuntype python python_untype --gitmode=True --custom_typing_module=custom_types
Feel free to contribute by proposing merge requests to this project.
This project uses Poetry and can be installed in development mode with the following steps:
git clone https://github.com/Escape-Technologies/pyuntype.git && cd pyuntype
poetry shell
poetry install
This project Pre-Commit to lint your code and make sure it is compliant to the rules we fixed.
pre-commit install --hook-type commit-msg
This project uses PyTest to unit test the code.