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.2.0.tar.gz (9.5 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.2.0.tar.gz.

File metadata

  • Download URL: community_of_python_flake8_plugin-0.2.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.2.0.tar.gz
Algorithm Hash digest
SHA256 c20fc27e245c7db566dc2dcfd9da5f13bc8175a74bf9df161b7cd261acbd770b
MD5 b5603545764f2d1517fbb0d88aa6ef3a
BLAKE2b-256 a19c2df36025ed5b198ace16a9956ae40bb22f1451925169b0ef09188023ebe0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: community_of_python_flake8_plugin-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55f9bedd65f585b7c6b2a0544686b1df8806f8c5a4a2f5e6e209d4149bfd153f
MD5 78f641405ad3cdb5e50767d534600a12
BLAKE2b-256 05bdc4ca341595a5cc81c64572c4b1ae16e91bcc97ba8350708dc36a709d6068

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