From 2bb360ef1c8170980c9ea391eed6bf86cb253a4c Mon Sep 17 00:00:00 2001 From: Alex Nolan Date: Sun, 23 Nov 2025 05:01:08 +0300 Subject: [PATCH] Update setup.cfg update --- setup.cfg | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index c4cdaf8..38bed6b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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.