From 7803d0d8171e6dbea8666f6a2f87b12df05d3d0b Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 30 Nov 2025 14:53:09 +0100 Subject: [PATCH] Enable D205: fix blank line after docstring summary --- PYTHON/screen_locker/screen_lock.py | 3 ++- PYTHON/split/split_x_into_n_symmetrically.py | 11 ++-------- pyproject.toml | 21 ++++++++++---------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/PYTHON/screen_locker/screen_lock.py b/PYTHON/screen_locker/screen_lock.py index aa56ca8..7fadb12 100755 --- a/PYTHON/screen_locker/screen_lock.py +++ b/PYTHON/screen_locker/screen_lock.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -"""Screen locker with workout verification for Arch Linux / i3wm +"""Screen locker with workout verification for Arch Linux / i3wm. + Requires user to log their workout to unlock the screen. """ diff --git a/PYTHON/split/split_x_into_n_symmetrically.py b/PYTHON/split/split_x_into_n_symmetrically.py index 14ff041..ccdddeb 100644 --- a/PYTHON/split/split_x_into_n_symmetrically.py +++ b/PYTHON/split/split_x_into_n_symmetrically.py @@ -41,19 +41,12 @@ def scale_to_total(X, weights): def split_x_into_n_symmetrically(X, N, factors): - """X: Total value to distribute. - N: Number in which we split. - factors: List controlling the difference in weights between consecutive days. - Must have length of N // 2 (if N is odd) or (N // 2 - 1) (if N is even). - """ + """Split X into N parts with symmetric weights controlled by factors.""" weights = calculate_symmetric_weights(N, middle_weight=1, factors=factors) return scale_to_total(X, weights) def split_x_into_n_middle(X, N, middle_value): - """X: Total value to distribute. - N: Number in which we split. - middle_value: Value of the middle number (the biggest weight). - """ + """Split X into N parts with symmetric weights using middle_value as peak.""" weights = calculate_symmetric_weights(N, middle_weight=middle_value) return scale_to_total(X, weights) diff --git a/pyproject.toml b/pyproject.toml index d042e7c..f9f005a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,6 @@ ignore = [ "COM812", # Trailing comma missing (conflicts with formatter) "ISC001", # Implicit string concatenation (conflicts with formatter) # Relaxed for script-heavy repository - "D205", # Missing blank line after summary - relaxed "D415", # Missing terminal punctuation - relaxed for scripts "INP001", # Implicit namespace package - this is a scripts repo "PLR2004", # Magic value comparison - common in scripts @@ -64,17 +63,8 @@ ignore = [ "ARG001", # Unused function argument - often needed for API compatibility "ARG002", # Unused method argument - often needed for API compatibility "TRY401", # Verbose log message - acceptable - "TRY300", # try-consider-else - style preference - "TRY301", # raise-within-try - style preference "PERF203", # try-except-in-loop - often necessary - "PERF401", # manual-list-comprehension - style preference - "RUF005", # collection-literal-concatenation - style preference "PGH003", # blanket-type-ignore - existing code - "SIM102", # collapsible-if - style preference - "SIM103", # needless-bool - style preference - "SIM105", # suppressible-exception - style preference - "SIM108", # if-else-block - style preference - "SIM113", # enumerate-for-loop - style preference "PLC0415", # import-outside-top-level - sometimes necessary "N816", # mixed-case-variable-in-global-scope - often constants "N806", # non-lowercase-variable - sometimes intentional @@ -88,12 +78,21 @@ ignore = [ "S112", # try-except-continue - acceptable pattern "ERA001", # commented-out-code - keeping for reference "B023", # function-uses-loop-variable - common pattern with closures - "B904", # raise-without-from - style preference "DTZ005", # datetime.now without tz - acceptable for local scripts "E741", # ambiguous-variable-name - sometimes intentional (e.g. l for list) "DTZ004", # datetime.utcfromtimestamp - acceptable "E722", # bare-except - will be fixed where critical "PT017", # pytest-assert-in-except - acceptable pattern + "PERF401", # manual-list-comprehension - style preference + "RUF005", # collection-literal-concatenation - style preference + "SIM102", # collapsible-if - style preference + "SIM103", # needless-bool - style preference + "SIM105", # suppressible-exception - style preference + "SIM108", # if-else-block - style preference + "SIM113", # enumerate-for-loop - style preference + "B904", # raise-without-from - style preference + "TRY300", # try-consider-else - style preference + "TRY301", # raise-within-try - style preference ] # Allow ALL rules to be auto-fixed