Skip to main content

flake8-type-ignore allows you to disallow type: ignore comments in your typed Python code.

Project description

flake8-type-ignore

flake8-type-ignore allows you to disallow type: ignore comments in your typed Python code.

Usage

When installed into your Python environment running flake8, this plugin will raise errors according to the table below. For example, installing this plugin will raise flake8 errors in the following code:

# This line raises TI100
x: str = 1  # type: ignore

# This line raises both TI101 and TI139
x.y = 2  # type:ignore[attr-defined,misc]

def print_only_strings(arg: str):
    print(arg)

# This line raises TI104
print_only_strings(123)

Error codes

flake8-type-ignore error code mypy error code
TI001 Meta error code for invalid type: ignore comments.
TI002 Meta error code for unknown mypy error codes.
TI100 Bare type: ignore comment
TI101 attr-defined
TI102 name-defined
TI103 call-arg
TI104 arg-type
TI105 call-overload
TI106 valid-type
TI107 var-annotated
TI108 override
TI109 return
TI110 return-value
TI111 assignment
TI112 type-arg
TI113 type-var
TI114 union-attr
TI115 index
TI116 operator
TI117 list-item
TI118 dict-item
TI119 typeddict-item
TI120 has-type
TI121 import
TI122 no-redef
TI123 func-returns-value
TI124 abstract
TI125 valid-newtype
TI126 str-format
TI127 str-bytes-safe
TI128 exit-return
TI129 no-untyped-def
TI130 no-untyped-call
TI131 redundant-cast
TI132 comparison-overlap
TI133 no-any-unimported
TI134 no-any-return
TI135 unreachable
TI136 redundant-expr
TI137 name-match
TI138 syntax
TI139 misc

License

Flask-Copilot is available under the BSD 3-Clause license. See the LICENSE file for more details.

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

flake8-type-ignore-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

flake8_type_ignore-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file flake8-type-ignore-0.1.0.tar.gz.

File metadata

  • Download URL: flake8-type-ignore-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for flake8-type-ignore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4ae4b42218f37f53eabee6c09884feee5f5392911e4feea5461df6daf1f85842
MD5 a08ce17bdf0b1bb437594621fa7e85db
BLAKE2b-256 386598d4a4b4c5a32b053211affcb10e6aa74933159256bad8a70541b89f85b9

See more details on using hashes here.

File details

Details for the file flake8_type_ignore-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flake8_type_ignore-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for flake8_type_ignore-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 310da4d80e08e6f7b9b5a8a587bc32bd37208ecb4c6e174b0cc57fa227338adc
MD5 5a41366a6827139172c553e98ba72879
BLAKE2b-256 2a0e9f2ea8d5b9b1b020a80f38cab20ec555374a67cd71e25141b7c2c5d5a674

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