Capitalize the explanations after "=>"

This commit is contained in:
Alexander Hess 2026-11-30 23:27:31 +01:00
commit 0090145b65
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
10 changed files with 44 additions and 44 deletions

View file

@ -24,7 +24,7 @@ def include_object(obj, _name, type_, _reflected, _compare_to):
"""Only include the clean schema into --autogenerate migrations.""" """Only include the clean schema into --autogenerate migrations."""
return not ( return not (
type_ in {"table", "column"} type_ in {"table", "column"}
and hasattr(obj, "schema") # => fix for rare edge case and hasattr(obj, "schema") # => Fix for rare edge case
and obj.schema != pkg_config.CLEAN_SCHEMA and obj.schema != pkg_config.CLEAN_SCHEMA
) )

View file

@ -197,34 +197,34 @@ select = [
# ============= # =============
# flake8's base # flake8's base
# ============= # =============
# mccabe => cyclomatic complexity # mccabe => Cyclomatic complexity
"C901", "C901",
# pycodestyle => PEP8 compliance # pycodestyle => PEP8 compliance
"E", "W", "E", "W",
# pyflakes => basic errors # pyflakes => Basic errors
"F4", "F5", "F6", "F7", "F8", "F9", "F4", "F5", "F6", "F7", "F8", "F9",
# ======= # =======
# plugins # plugins
# ======= # =======
# flake8-annotations => enforce type checking for functions # flake8-annotations => Enforce type checking for functions
"ANN0", "ANN2", "ANN3", "ANN0", "ANN2", "ANN3",
# flake8-bandit => common security issues # flake8-bandit => Common security issues
"S1", "S2", "S3", "S4", "S5", "S6", "S7", "S1", "S2", "S3", "S4", "S5", "S6", "S7",
# flake8-black => complain if black would make changes # flake8-black => Complain if black would make changes
"BLK1", "BLK9", "BLK1", "BLK9",
# flake8-boolean-trap => Keyword-only flags # flake8-boolean-trap => Keyword-only flags
"FBT", "FBT",
# flake8-broken-line => no \ to end a line # flake8-broken-line => No \ to end a line
"N400", "N400",
# flake8-bugbear => opinionated bugs and design flaws # flake8-bugbear => Opinionated bugs and design flaws
"B0", "B3", "B9", "B0", "B3", "B9",
# flake8-builtins => No shadowing of builtins # flake8-builtins => No shadowing of builtins
"A0", "A0",
# flake8-commas => better comma placements # flake8-commas => Better comma placements
"C8", "C8",
# flake8-comprehensions => better comprehensions # flake8-comprehensions => Better comprehensions
"C4", "C4",
# flake8-debugger => no debugger usage # flake8-debugger => No debugger usage
"T100", "T100",
# flake8-docstrings => PEP257 compliance # flake8-docstrings => PEP257 compliance
"D1", "D2", "D3", "D4", "D1", "D2", "D3", "D4",
@ -232,25 +232,25 @@ select = [
"EM", "EM",
# flake8-implicit-str-concat => Unified string concatenation # flake8-implicit-str-concat => Unified string concatenation
"ISC", "ISC",
# flake8-pytest-style => enforce a consistent style with pytest # flake8-pytest-style => Enforce a consistent style with pytest
"PT0", "PT0",
# flake8-quotes => use double quotes everywhere (complying with black) # flake8-quotes => Use double quotes everywhere (complying with black)
"Q0", "Q0",
# flake8-return => Consistent return statements # flake8-return => Consistent return statements
"R5", "R5",
# flake8-sfs => use f-strings as the only type of string formatting # flake8-sfs => Use f-strings as the only type of string formatting
"SFS", "SFS",
# flake8-simplify => Simpler code # flake8-simplify => Simpler code
"SIM", "SIM",
# flake8-todos => unify TODOs # flake8-todos => Unify TODOs
"T00", "T00",
# flake8-unused-arguments => declared function arguments must be used # flake8-unused-arguments => Declared function arguments must be used
"U100", "U100",
# pandas-vet => Idiomatic `pandas` # pandas-vet => Idiomatic `pandas`
"PD0", "PD0",
# pep8-naming => PEP8 naming conventions # pep8-naming => PEP8 naming conventions
"N8", "N8",
# pydoclint => docstring matches implementation # pydoclint => Docstring matches implementation
"DOC", "DOC",
# ======================================== # ========================================
# `ruff` only (no working `flake8` plugin) # `ruff` only (no working `flake8` plugin)
@ -282,7 +282,7 @@ ignore = []
extend-ignore = [ extend-ignore = [
# `ruff`'s A003 does this better, as it only flags actual shadowing # `ruff`'s A003 does this better, as it only flags actual shadowing
"A003", "A003",
# Too long line => duplicate with E501. # Too long line => Duplicate with E501.
"B950", "B950",
# PEP 257 documents the arguments of `__init__()` in its own docstring. # PEP 257 documents the arguments of `__init__()` in its own docstring.
"DOC301", "DOC301",
@ -500,17 +500,17 @@ select = [
# =================================== # ===================================
# flake8-builtins => No shadowing of builtins # flake8-builtins => No shadowing of builtins
"A", "A",
# flake8-annotations => enforce type checking for functions # flake8-annotations => Enforce type checking for functions
"ANN0", "ANN2", "ANN0", "ANN2",
# flake8-unused-arguments ("U100") => declared function arguments must be used # flake8-unused-arguments ("U100") => Declared function arguments must be used
"ARG", "ARG",
# flake8-bugbear => opinionated bugs and design flaws # flake8-bugbear => Opinionated bugs and design flaws
"B", "B",
# flake8-comprehensions => better comprehensions # flake8-comprehensions => Better comprehensions
"C4", "C4",
# mccabe => cyclomatic complexity # mccabe => Cyclomatic complexity
"C90", "C90",
# flake8-commas ("C8") => better comma placements # flake8-commas ("C8") => Better comma placements
"COM", "COM",
# flake8-docstrings => PEP257 compliance # flake8-docstrings => PEP257 compliance
"D", "D",
@ -518,7 +518,7 @@ select = [
"E", "W", "E", "W",
# flake8-errmsg => Shorter tracebacks # flake8-errmsg => Shorter tracebacks
"EM", "EM",
# pyflakes => basic errors # pyflakes => Basic errors
"F", "F",
# flake8-boolean-trap => Keyword-only flags # flake8-boolean-trap => Keyword-only flags
"FBT", "FBT",
@ -528,28 +528,28 @@ select = [
"N", "N",
# pandas-vet => Idiomatic `pandas` # pandas-vet => Idiomatic `pandas`
"PD", "PD",
# flake8-pytest-style => enforce a consistent style with pytest # flake8-pytest-style => Enforce a consistent style with pytest
"PT", "PT",
# flake8-quotes => use double quotes everywhere # flake8-quotes => Use double quotes everywhere
"Q", "Q",
# flake8-return ("R5") => Consistent return statements # flake8-return ("R5") => Consistent return statements
"RET", "RET",
# flake8-bandit => common security issues # flake8-bandit => Common security issues
"S", "S",
# flake8-simplify => Simpler code # flake8-simplify => Simpler code
"SIM", "SIM",
# flake8-debugger => no debugger usage # flake8-debugger => No debugger usage
"T10", "T10",
# flake8-todos => unify TODOs # flake8-todos => Unify TODOs
"TD", "TD",
# ======================================= # =======================================
# Violations not covered by `flake8` above # Violations not covered by `flake8` above
# ======================================= # =======================================
# eradicate => no commented-out code # eradicate => No commented-out code
"ERA", "ERA",
# refurb => Modern idioms # refurb => Modern idioms
"FURB", "FURB",
# isort => imports are sorted # isort => Imports are sorted
"I", "I",
# flake8-import-conventions => Unified import aliases # flake8-import-conventions => Unified import aliases
"ICN", "ICN",
@ -565,7 +565,7 @@ select = [
"RUF", "RUF",
# flake8-self => No access to private members from outside # flake8-self => No access to private members from outside
"SLF", "SLF",
# flake8-print => no `print()` # flake8-print => No `print()`
"T20", "T20",
# pyupgrade => Modern syntax for the targeted Python version # pyupgrade => Modern syntax for the targeted Python version
"UP", "UP",

View file

@ -108,7 +108,7 @@
" -> created 38 pixels\n", " -> created 38 pixels\n",
"Creating grid with a side length of 1414 meters\n", "Creating grid with a side length of 1414 meters\n",
" -> created 24 pixels\n", " -> created 24 pixels\n",
"=> assigned 358 out of 48058 addresses in Lyon\n", "=> Assigned 358 out of 48058 addresses in Lyon\n",
"\n", "\n",
"Creating grids for Paris\n", "Creating grids for Paris\n",
"Creating grid with a side length of 707 meters\n", "Creating grid with a side length of 707 meters\n",
@ -117,7 +117,7 @@
" -> created 111 pixels\n", " -> created 111 pixels\n",
"Creating grid with a side length of 1414 meters\n", "Creating grid with a side length of 1414 meters\n",
" -> created 66 pixels\n", " -> created 66 pixels\n",
"=> assigned 1133 out of 108135 addresses in Paris\n", "=> Assigned 1133 out of 108135 addresses in Paris\n",
"\n", "\n",
"Creating grids for Bordeaux\n", "Creating grids for Bordeaux\n",
"Creating grid with a side length of 707 meters\n", "Creating grid with a side length of 707 meters\n",
@ -126,7 +126,7 @@
" -> created 22 pixels\n", " -> created 22 pixels\n",
"Creating grid with a side length of 1414 meters\n", "Creating grid with a side length of 1414 meters\n",
" -> created 15 pixels\n", " -> created 15 pixels\n",
"=> assigned 123 out of 21742 addresses in Bordeaux\n" "=> Assigned 123 out of 21742 addresses in Bordeaux\n"
] ]
} }
], ],

View file

@ -64,7 +64,7 @@ def tactical_heuristic( # noqa:C901,D417,DOC001
TIME_STEP: length of one time step in minutes; defaults to `60` TIME_STEP: length of one time step in minutes; defaults to `60`
TRAIN_HORIZON: length of the training horizon; defaults to `8` TRAIN_HORIZON: length of the training horizon; defaults to `8`
""" # noqa:D412,D417 => formatted as `click` help text """ # noqa:D412,D417 => Formatted as `click` help text
# Input validation. # Input validation.
try: try:

View file

@ -42,7 +42,7 @@ def gridify() -> None: # pragma: no cover note:b1f68d24
.count() .count()
) )
click.echo( click.echo(
f"=> assigned {n_assigned} out of {len(city.addresses)} addresses in {city.name}", # noqa:E501 f"=> Assigned {n_assigned} out of {len(city.addresses)} addresses in {city.name}", # noqa:E501
) )
db.session.commit() db.session.commit()

View file

@ -528,7 +528,7 @@ class Order(meta.Base):
def corrected(self) -> bool: def corrected(self) -> bool:
"""If any timestamp was corrected as compared to the original data.""" """If any timestamp was corrected as compared to the original data."""
return bool( return bool(
self.scheduled_delivery_at_corrected # => too much logic self.scheduled_delivery_at_corrected # => Too much logic
or self.cancelled_at_corrected or self.cancelled_at_corrected
or self.restaurant_notified_at_corrected or self.restaurant_notified_at_corrected
or self.restaurant_confirmed_at_corrected or self.restaurant_confirmed_at_corrected

View file

@ -111,7 +111,7 @@ def stl( # noqa:C901,PLR0912,PLR0913,PLR0915
raise ValueError(msg) raise ValueError(msg)
else: else:
nt = default_nt nt = default_nt
if nt % 2 == 0: # pragma: no cover => hard to construct edge case if nt % 2 == 0: # pragma: no cover => Hard to construct edge case
nt += 1 nt += 1
if nl is not None: if nl is not None:
@ -120,7 +120,7 @@ def stl( # noqa:C901,PLR0912,PLR0913,PLR0915
raise ValueError(msg) raise ValueError(msg)
elif frequency % 2 == 0: elif frequency % 2 == 0:
nl = frequency + 1 nl = frequency + 1
else: # pragma: no cover => hard to construct edge case else: # pragma: no cover => Hard to construct edge case
nl = frequency nl = frequency
if ds not in {0, 1}: if ds not in {0, 1}:

View file

@ -57,7 +57,7 @@ class RealtimeARIMAModel(base.ForecastingModelABC):
decomposed_training_ts = methods.decomposition.stl( decomposed_training_ts = methods.decomposition.stl(
time_series=training_ts, time_series=training_ts,
frequency=frequency, frequency=frequency,
# "Periodic" `ns` parameter => same seasonal component value # "Periodic" `ns` parameter => Same seasonal component value
# for observations of the same lag. # for observations of the same lag.
ns=999, ns=999,
) )

View file

@ -57,7 +57,7 @@ class VerticalARIMAModel(base.ForecastingModelABC):
decomposed_training_ts = methods.decomposition.stl( decomposed_training_ts = methods.decomposition.stl(
time_series=training_ts, time_series=training_ts,
frequency=frequency, frequency=frequency,
# "Periodic" `ns` parameter => same seasonal component value # "Periodic" `ns` parameter => Same seasonal component value
# for observations of the same lag. # for observations of the same lag.
ns=999, ns=999,
) )

View file

@ -105,7 +105,7 @@ def make_order(make_address, make_courier, make_customer, make_restaurant):
customer=make_customer(), # assume a unique `Customer` per order customer=make_customer(), # assume a unique `Customer` per order
courier=courier, courier=courier,
pickup_address=restaurant.address, # no `Address` history pickup_address=restaurant.address, # no `Address` history
delivery_address=make_address(), # unique `Customer` => new `Address` delivery_address=make_address(), # unique `Customer` => New `Address`
**kwargs, **kwargs,
) )