CLI tool for providing a clean slate for mypy usage within a project.
Project description
Mypy Clean Slate
Ignore all errors thrown by mypy so as to provide a "clean slate" from which to run mypy with strict settings.
Usage
usage: main.py [-h] [-n] [-r] [-a] [-o MYPY_REPORT_OUTPUT]
CLI tool for providing a clean slate for mypy usage within a project.
optional arguments:
-h, --help show this help message and exit
-n, --none Handle missing "-> None" hints on functions.
-r, --generate_mypy_error_report
Generate 'mypy_error_report.txt' in the cwd.
-a, --add_type_ignore
Add "# type: ignore[<error-code>]" to suppress all raised mypy errors.
-o MYPY_REPORT_OUTPUT, --mypy_report_output MYPY_REPORT_OUTPUT
File to save report output to (default is mypy_error_report.txt)
Issues
Handling lines with preexisting ignores.
If there are instances of pylint: disable
or noqa:
ignores then these currently have
to be handled separately. eg:
def add(a, b): # pylint: disable=invalid-name
return a + b
would be manually rewritten as
def add(a, b): # type: ignore[no-untyped-def] # pylint: disable=invalid-name
return a + b
TODO
- handle there being different types of ignores (pylint/flake8/etc) already within the code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mypy_clean_slate-0.1.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for mypy_clean_slate-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1911632d9ac8dce17f9b0c8c38da80e9bf793d16007e85bd9fc6bb906461905 |
|
MD5 | f0fc86e77cd9b5a9c2dc6a1afb1a6385 |
|
BLAKE2b-256 | 9ef5bd57ab7fe24b266a57669d52e50a10da96a03ddd35f7a41f481af9ca2075 |