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

File metadata

  • Download URL: community_of_python_flake8_plugin-0.3.3.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.3.tar.gz
Algorithm Hash digest
SHA256 e76dc48e98ba167cb2f98c661208323a31f297459a0ec0193535950f5c9344b1
MD5 2331357e635dfce65a3ab9494ce9d489
BLAKE2b-256 de575e3c2b0825cfe437696760a53cee80f43347b0fd576194713e71850afce6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: community_of_python_flake8_plugin-0.3.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0192c7d005ca9abffeb8c39579fc66c6458e1eb357690bdf1bba506e6b0e0b8a
MD5 970525279b0ce7f38cb6e45b3c0032e2
BLAKE2b-256 4a400b3063ef7d765e59b44356e2ab7c4a354aeb9361a47b2b85113ee035b538

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