Linter (flake8, pylint, custom CLI) for finding usage of deprecated functions.
Project description
flake8-warnings
Python linter that warns you about using deprecated modules, classes, and functions. It provides a CLI as well as flake8 and pylint plugins.
Usage
Installation:
python3 -m pip install flake8-warnings
Now, you can use it in one of the following ways:
- Directly from CLI:
python3 -m flake8_warnings ./my_project/
- As a flake8 plugin. Just run
flake8 ./my_project/
, it will automatically detect the plugin. - As a pylint plugin. For pylint, plugins must be explicitly specified:
pylint --load-plugins=flake8_warnings ./my_project/
.
How it works
It analyzes all imported modules, classes and functions and detects the following:
- warnings.warn function calls.
- Deprecation decorators like deprecated or deprecation.
- Deprecation messages in docstrings.
License
- flake8-wranings is licensed under MIT License. On practice, I don't care how you're going to use it. i did the project because it is fun, not because I want to be famous or whatever.
- astroid is a direct runtime dependency of flake8-warning and it is licensed under LGPL-2.1 License. It allows commercial and private usage, distribution and whatever, don't confuse it with GPL. However, if your legal department is still nervous, just don't make flake8-warnings a production dependency (why would you?), use it only on dev and test environments.
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-warnings-0.1.0.tar.gz
(9.8 kB
view details)
Built Distribution
File details
Details for the file flake8-warnings-0.1.0.tar.gz
.
File metadata
- Download URL: flake8-warnings-0.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5075eb3152fa4c7ab3657f48c235c4a24d61ecda7814585b8a9907f3d15f3e6 |
|
MD5 | 5e79d1b5c82e40437b2e2f615d4493ab |
|
BLAKE2b-256 | 57136a17ed4a523c32e193b98dcc2503f08878d0c5c26e5b616918c8ce8bfd0b |
File details
Details for the file flake8_warnings-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_warnings-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 450b1e54591dc9f421be17033476167b840e72aabe0f25f35116b285d14b3117 |
|
MD5 | bcc4f23f511ce057bdde8d1513cef2de |
|
BLAKE2b-256 | 60b9dc121bfbf7463409c84f23ce9697245939c8f692b6a8e3f3475ea8c0e361 |