Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
# setup.cfg - Optimized Configuration File

# Project metadata configuration.
# This section is used by packaging tools like setuptools.
[metadata]
description-file = README.md

# --- Code Quality and Testing Configuration ---

# Configuration for Pytest, the main testing framework.
# We keep this section concise for testing logic configuration.
# Style ignoring is delegated entirely to Flake8 for centralized management.
[tool:pytest]
pep8ignore = E501
# Add any specific pytest configurations here (e.g., testpaths, addopts).
# Example:
# addopts = --strict-markers

# Configuration for Flake8, the primary style checker.
# It enforces PEP 8 and checks for complexity and common style errors.
[flake8]
# Define directories and files to exclude from linting checks.
# This prevents checking vendor code, build artifacts, and configuration directories.
exclude =
.git,
.tox,
build,
dist
# Maximum cyclomatic complexity allowed for functions/methods.
# A complexity score above 10 often indicates code that is difficult to test and maintain.
max-complexity = 10
ignore = E501, W503, W504
# List of error codes to ignore globally:
# E501: Line too long (allows lines > 79 characters, common practice for readability).
# W503: Line break occurred before a binary operator (we allow this to simplify formatting).
ignore = E501, W503

# Note on W504: We do not explicitly ignore W504
# (line break occurred after binary operator) as W503 is ignored,
# defaulting the project to the more modern W504 style.