Skip to main content

flake8 based linter for e2e tests

Project description

flake8-qa-style

Flake8 based linter with some qa best-practice for writing tests

Installation

pip inslall flake8-qa-style

Rules

  1. CS001: using sleep(1) instead of sleep(var), var - meaningful variable
  2. CS002: using print()
  3. CS003: assert same variables: assert var == var
  4. CS004: assert variable with constant: assert var == 1
  5. CS005: missing type annotation for argument in function
  6. CS006: missing function return type annotation
  7. CS007: file should not start with a blank line
  8. CS008: nested "with" statements of the same type should be comma-separated
  9. CS009: each context manager in a "with" statement must be on its own line

Rules configuration

[flake8]
;for methods with @property decorator skip CS006
skip_property_return_annotation = true

Configuration

Flake8-qa-style is flake8 plugin, so the configuration is the same as flake8 configuration.

You can ignore rules via

  • file setup.cfg: parameter ignore
[flake8]
ignore = CS001
  • comment in code #noqa: CS001

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_qa_style-1.2.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

flake8_qa_style-1.2.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file flake8_qa_style-1.2.0.tar.gz.

File metadata

  • Download URL: flake8_qa_style-1.2.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for flake8_qa_style-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ce44f6982174882313bcd55c2145a1f194bf41ef0ef10d861cbfb9a3e29dfebc
MD5 4af250001e4a08c383a5530ffe4ca3a7
BLAKE2b-256 0d7e1de6d59f3795a0f5c97ae0a017f48cb626b968ff47c4cb8414d12ba9e928

See more details on using hashes here.

File details

Details for the file flake8_qa_style-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_qa_style-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca892fe352863841e70ed2065f904b3570d0600594fc09742e6c1da2c015f8c9
MD5 dad5b48e5443626938961a109ea044cc
BLAKE2b-256 256e651c73255c68f23464bec344438c52b3aaad0e73d3f99fd8ecfd274dbc03

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