flake8-force
Flake8 extension that provides force-check option.
When this option is enabled, flake8 performs all checks even if the target file cannot be interpreted as a Python source code (e.g., when there is a syntax error in the file).
This extension was written to bring back the behavior of flake8 v3.x in flake8 v4.0+ to lint against Cython code. Note that the option is ineffective in flake8 v3.x or earlier.
Installation
pip install flake8-force
Usage
- Specify the option via the command line:
flake8 --force-check .... - Add
force-check = Trueto the flake8 configuration file.
Tips for checking Cython code
While this extension "forces" flake8 to ignore problems with parsing Cython syntax as Python code, flake8 must be separately configured to permit Cython syntax through ignoring certain rules. The configuration below is suggested for that purpose. Some projects may not need to ignore every rule, depending on the use of Cython. The pycodestyle docs define what each rule means.
[flake8]
filename = *.py,*.pyx,*.pxd,*.pxi
ignore = E203,E225,E226,E227,E402,E741,E901,E999,W503,W504
force-check = True
Pre-commit hook
The configuration below can be used with pre-commit to install this extension alongside flake8 and enable checking Cython files. Also see the flake8 docs on version control hooks.
- repo: https://github.com/PyCQA/flake8
rev: '' # Pick a git hash / tag to point to
hooks:
- id: flake8
types: ["file"] # Override the default types (only python)
types_or: ["python", "cython"] # Support both python and cython types
additional_dependencies: ["flake8-force"] # Add this extension
Metadata
Release files for flake8-force 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flake8-force-0.0.2.tar.gz | 3.9 kB | Without provenance | Details for flake8-force-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flake8_force-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for flake8_force-0.0.2-py3-none-any.whl |
Total release size: 8.2 kB
Release files / flake8-force-0.0.2.tar.gz
| Download URL | flake8-force-0.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55aa38f49101431c08517d498e0dd2b491e6adedb6dbdd716b6c79d78f8bd0cf
|
|
BLAKE2b-256 checksum How to use checksums |
5405581e8a332cca076713131f527a564941dadf7a4f4e1cae30556d2917486f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Release files / flake8_force-0.0.2-py3-none-any.whl
| Download URL | flake8_force-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc01651623964c1c4163e767347fa1bf23cf22ba9c449e344eb4e573bde46436
|
|
BLAKE2b-256 checksum How to use checksums |
a689dd3cde459e213a92a712bc57e9890187c003c918cf3391a5b55aefe6f664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Security for flake8-force 0.0.2
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.