Skip to main content

A flake8 extension that implements misc. lints

Project description

flake8-pie CircleCI pypi

A flake8 extension that implements misc. lints

lints

PIE781: 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

PIE782: No Pointless F Strings

Warn about usage of f-string without templated values.

examples

x = (
    f"foo {y}", # ok
    f"bar" # error
)

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


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.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_pie-0.2.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file flake8-pie-0.2.0.tar.gz.

File metadata

  • Download URL: flake8-pie-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for flake8-pie-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ea8995249ab038a69ff4012e402443856725d2ba36935baa6aeb08f480fb3663
MD5 1fc576f113d80b745d8553704544e573
BLAKE2b-256 9123369fa165fba51c3e504ce8deaffe9eee0f670de0ed21d9565f7ce5649844

See more details on using hashes here.

File details

Details for the file flake8_pie-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: flake8_pie-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for flake8_pie-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c299649ca838f93ddf0f6b8daaf482f3d7f689c2132754032830278dcba6b18
MD5 9e7f62f9a74abce0144137a819435d48
BLAKE2b-256 668a50c771a0181c17c5c4847a9640d8972d9732ef1a39db5cc188c4d90a37ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page