Skip to main content

Mypy Helper

CI Coverage pypi downloads versions license

A tool to generate type hints and fix mypy errors.

Installation

pip install mypy-helper

Usage

To see a list of available commands, run the following:

mypy-help --help

Rectifying 'ignore-without-code' issues

ignore-without-code is a mypy error code enforcing the developer to provide error code for the "# type: ignore" comment.

The command fix-ignore-without-code fixes ignore without code. Use this before you have tried your best to eleminate the ignore

  • Usage: mypy-helper fix-ignore-without-code [OPTIONS] PATH MYPY_OUTPUT
  • Options:
    • -e, --ext TEXT Append another extension
    • --help Show this message and exit.

example:

Firstly, run mypy to collect errors.

mypy . --strict --enable-errror-code ignore-without-code > errors.txt

Secondly, fix the errors.

mypy-helper fix-ignore-without-code  examples/simple_example examples/simple_example/errors.txt

before:

a = 1
b = 2

a = "1"
b = "1"  # type: ignore

after:

a = 1
b = 2

a = "1"
b = "1"  # type: ignore[assignment]

Metadata

Release files for mypy-helper 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mypy-helper 0.1.1
File Size Uploaded Provenance
mypy_helper-0.1.1.tar.gz 4.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mypy-helper 0.1.1
File Interpreter ABI Platform
mypy_helper-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / mypy_helper-0.1.1.tar.gz

Download URL mypy_helper-0.1.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c4b38575e38275727b04773c2f1fd2b5163677812f5413d098cd3d38ae4afb26
BLAKE2b-256 checksum
How to use checksums
b07519e8b07bac9f83556410da5d42e6b7ee0add79537df0678dc796b98bdaeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / mypy_helper-0.1.1-py3-none-any.whl

Download URL mypy_helper-0.1.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1caaf5f8efe43673a98e9aa9242b3828a4e59bb4decd75737f8babdf8d105a07
BLAKE2b-256 checksum
How to use checksums
2a39268eda123d2a560cafa94abe8f8c23f979f1aeb2e0d553b5bb35c93838d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for mypy-helper 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page