Skip to main content

Community of Python flake8 plugin

Project description

Community of Python Flake8 Plugin

A Flake8 plugin that enforces the Community of Python's custom code style rules. This plugin provides a set of checks designed to promote consistent and idiomatic Python code within the community.

Features

This plugin implements the following code style checks:

  • COP001: Use module import when importing more than two names
  • COP002: Import standard library modules as whole modules
  • COP003: Avoid explicit scalar type annotations
  • COP004: Attribute name must be at least 8 characters
  • COP005: Variable name must be at least 8 characters
  • COP006: Argument name must be at least 8 characters
  • COP007: Function name must be at least 8 characters
  • COP008: Class name must be at least 8 characters
  • COP009: Function identifier must be a verb
  • COP010: Avoid get_ prefix in async function names
  • COP011: Avoid temporary variables used only once
  • COP012: Classes should be marked typing.final
  • COP013: Wrap module dictionaries with types.MappingProxyType
  • COP014: Use dataclasses with kw_only=True, slots=True, frozen=True

Installation

Install the plugin using uv (recommended):

uv add --dev community-of-python-flake8-plugin

Or install via pip:

pip install community-of-python-flake8-plugin

Usage

Run Flake8 with the plugin enabled:

uv run flake8 --select COP --exclude .venv .

Or if installed globally:

flake8 --select COP --exclude .venv .

Configuration

Add the following to your pyproject.toml when using https://pypi.org/project/Flake8-pyproject/:

[tool.flake8]
select = ["COP"]
exclude = [".venv"]

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

community_of_python_flake8_plugin-0.3.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file community_of_python_flake8_plugin-0.3.2.tar.gz.

File metadata

  • Download URL: community_of_python_flake8_plugin-0.3.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for community_of_python_flake8_plugin-0.3.2.tar.gz
Algorithm Hash digest
SHA256 79abf1199d2c4979641730fb5f9b477a999dbe90aa2dd613682f35d6d17b4eb1
MD5 ed3b86f8f54da7db8ce0995ed87cb61d
BLAKE2b-256 5f5dee014bb8517ad2bc4d341a4c07106d02391e4af40a0d30e404cd887692e3

See more details on using hashes here.

File details

Details for the file community_of_python_flake8_plugin-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: community_of_python_flake8_plugin-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for community_of_python_flake8_plugin-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b2260fd425147b77584198a924ef3a6a5fa57cadda76d365ad7089f492a7bda
MD5 23382760d4dba549b31bd19c2a2ec3e4
BLAKE2b-256 6ec4f7f997b711a6b05a42fe20cd2dd431b420f44fd6a16a0dcd83eae0a154ca

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