Skip to main content

Programatically untype your Python code

Project description

Python untype

Programatically untype your Python Projects.

Credits

The original idea and code of this project comes from the following Stack OverFlow thread.

Install

pip install pyuntype

Usage

Use the following command to completely untype your Python Project located in the src/ folder.

pyuntype src/ dest/

Option gitmode (bool)

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)

Option custom_typing_module (str)

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

Example:

For the Python CLI, we can use:

pyuntype python python_untype --gitmode=True --custom_typing_module=custom_types

Contribute

Development install

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

Pre-commit

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

Testing --wip--

This project uses PyTest to unit test the code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyuntype-0.0.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

pyuntype-0.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pyuntype-0.0.3.tar.gz.

File metadata

  • Download URL: pyuntype-0.0.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.5 Darwin/20.4.0

File hashes

Hashes for pyuntype-0.0.3.tar.gz
Algorithm Hash digest
SHA256 83f259229fa3b3fcb4395ca2b19e5894e27b8d90fee153e5a9bab1ff38fc5c50
MD5 5f4d4d0a50ab5e1c1c1dbc4b5bf9709c
BLAKE2b-256 7c491620545ae5875ab61832ed1077ccb62c2122fe25e35df15d164070eac0a3

See more details on using hashes here.

File details

Details for the file pyuntype-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyuntype-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.5 Darwin/20.4.0

File hashes

Hashes for pyuntype-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 97b5f5c28893450e34696fff8aa386a5faa931463a58fd8c8d2fd553ad868923
MD5 d9b581a078d1dca21288dc10697cac32
BLAKE2b-256 fbfb135ca37f2b5d4cc4447fc655c15e22a16747586722bb9b522fcb447d2dbb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page