A flake8 extension that implements misc. lints
Project description
flake8-pie
A flake8 extension that implements misc. lints
lints
B781: Assign and Return
Based on Clippy's
let_and_return
and Microsoft's TSLint rule
no-unnecessary-local-variable
.
For more info on the structure of this lint, see the accompanying blog post.
examples
# error
def foo():
x = bar()
return x
# allowed
def foo():
x, _ = bar()
return x
dev
# install dependencies
poetry install
# install plugin to work with flake8
poetry run python setup.py install
# test
poetry run pytest
# or with watch
poetry run ptw
# typecheck
poetry run mypy *.py
# format
poetry run black .
# lint
poetry run flake8 .
uploading a new version to PyPi
# increment `__version__` and pyproject.toml `version`
# build new distribution files
rm -rf dist && poetry run python setup.py sdist bdist_wheel
# upload to pypi (Note: this will ask for login credentials)
poetry run twine upload dist/*
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
flake8-pie-0.0.4.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for flake8_pie-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad9801876df62a682dcc633ca495bfcd9933694b9efa7a578d120ea94001b39 |
|
MD5 | 2ce7d9156e365f5a3bfe979b2bbfab91 |
|
BLAKE2b-256 | 9e274bef836a10fc36b0a7dd9885d67fe6246739d6ad4d336e6f51803a60368a |