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.4.1.tar.gz (12.9 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.4.1.tar.gz.

File metadata

  • Download URL: community_of_python_flake8_plugin-0.4.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.4.1.tar.gz
Algorithm Hash digest
SHA256 50ccd15ebe0f0c291e7a4301cc14ff60632838a21e8bd21777c87dbbb078beb6
MD5 ae79bebcadb37a8b8f4b9c3f16f6da6a
BLAKE2b-256 a09b57501db46d50589fe3587393c1c15ed9e1321442ac5904040816c0f41d59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: community_of_python_flake8_plugin-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae41932b044ba6f62eacf4cf53560bf700951064db50df2de2dfdaf8c01d56db
MD5 9f49187d29250bb0b9b6446dc28bae23
BLAKE2b-256 4592262eed90cc291fea8755c051835359c5d61808735ea54358b40f629dd599

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