A plugin for flake8 to enable linting .pyi files.
Project description
A plugin for Flake8 that provides specializations for type hinting stub files, especially interesting for linting typeshed.
Functionality
Adds the .pyi extension to the default value of the --filename command-line argument to Flake8. This means stubs are linted by default with this plugin enabled, without needing to explicitly list every file.
Modifies PyFlakes runs for .pyi files to defer checking type annotation expressions after the entire file has been read. This enables support for first-class forward references that stub files use.
The latter should ideally be merged into flake8 as the integration is currently pretty brittle (might break with future versions of pyflakes, flake8, or due to interactions with other overly clever plugins).
List of warnings
Currently this plugin doesn’t add any warnings of its own. It does reserve codes starting with Y0.
License
MIT
Tests
Just run:
python setup.py test
Change Log
16.12.0
first published version
date-versioned
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
Built Distribution
File details
Details for the file flake8-pyi-16.12.0.tar.gz
.
File metadata
- Download URL: flake8-pyi-16.12.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff43a6e4263640cffe97d36f9fa39361b2a99ba4086fd6f20392b147c078ab33 |
|
MD5 | 981b5d6c6de3fe9fb8a2a20a0ed6124d |
|
BLAKE2b-256 | e9ad5da9c7b104254cf04d7fe87d4baf356e634d52d540ae2c56802be5be276d |
Provenance
File details
Details for the file flake8_pyi-16.12.0-py35.py36-none-any.whl
.
File metadata
- Download URL: flake8_pyi-16.12.0-py35.py36-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3.5, Python 3.6
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b137d4ec79f58f7f02c3b4a26285ae386490f27e6a69b06074dcf0eb02ea7d7c |
|
MD5 | 54683a0c34dc10fd95154e104cae5dc7 |
|
BLAKE2b-256 | c5fe7efccefdc8fcbfed9199af7d82864c784848fc2ee25071d50b1b7f11df2e |