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.4.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.4.tar.gz.

File metadata

  • Download URL: community_of_python_flake8_plugin-0.3.4.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.4.tar.gz
Algorithm Hash digest
SHA256 46ade93e5db55b05c8357a30b16c9c1fda89d8f2e6f4d9cc36d1f0d54d5b8aa8
MD5 d283926f50efe7f5a427e6b9566c1930
BLAKE2b-256 d8a3f5961361107a153212883053a943fb598f4845377b30b6fe07b2a7a063fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: community_of_python_flake8_plugin-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 22.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 636a1ac9c4f06a47508a9b1210d351a8785f2514d8637f9756016392c854544a
MD5 504b0be2e3332cbbf2ef828e4523cbd4
BLAKE2b-256 533b8081256732d294cc7a9ff41ef413a138bba2d57c4fa295a4b6808bc3aad9

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