Capitalize the explanations after "=>"
This commit is contained in:
parent
c56fe649b7
commit
0090145b65
10 changed files with 44 additions and 44 deletions
|
|
@ -24,7 +24,7 @@ def include_object(obj, _name, type_, _reflected, _compare_to):
|
|||
"""Only include the clean schema into --autogenerate migrations."""
|
||||
return not (
|
||||
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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -197,34 +197,34 @@ select = [
|
|||
# =============
|
||||
# flake8's base
|
||||
# =============
|
||||
# mccabe => cyclomatic complexity
|
||||
# mccabe => Cyclomatic complexity
|
||||
"C901",
|
||||
# pycodestyle => PEP8 compliance
|
||||
"E", "W",
|
||||
# pyflakes => basic errors
|
||||
# pyflakes => Basic errors
|
||||
"F4", "F5", "F6", "F7", "F8", "F9",
|
||||
# =======
|
||||
# plugins
|
||||
# =======
|
||||
# flake8-annotations => enforce type checking for functions
|
||||
# flake8-annotations => Enforce type checking for functions
|
||||
"ANN0", "ANN2", "ANN3",
|
||||
# flake8-bandit => common security issues
|
||||
# flake8-bandit => Common security issues
|
||||
"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",
|
||||
# flake8-boolean-trap => Keyword-only flags
|
||||
"FBT",
|
||||
# flake8-broken-line => no \ to end a line
|
||||
# flake8-broken-line => No \ to end a line
|
||||
"N400",
|
||||
# flake8-bugbear => opinionated bugs and design flaws
|
||||
# flake8-bugbear => Opinionated bugs and design flaws
|
||||
"B0", "B3", "B9",
|
||||
# flake8-builtins => No shadowing of builtins
|
||||
"A0",
|
||||
# flake8-commas => better comma placements
|
||||
# flake8-commas => Better comma placements
|
||||
"C8",
|
||||
# flake8-comprehensions => better comprehensions
|
||||
# flake8-comprehensions => Better comprehensions
|
||||
"C4",
|
||||
# flake8-debugger => no debugger usage
|
||||
# flake8-debugger => No debugger usage
|
||||
"T100",
|
||||
# flake8-docstrings => PEP257 compliance
|
||||
"D1", "D2", "D3", "D4",
|
||||
|
|
@ -232,25 +232,25 @@ select = [
|
|||
"EM",
|
||||
# flake8-implicit-str-concat => Unified string concatenation
|
||||
"ISC",
|
||||
# flake8-pytest-style => enforce a consistent style with pytest
|
||||
# flake8-pytest-style => Enforce a consistent style with pytest
|
||||
"PT0",
|
||||
# flake8-quotes => use double quotes everywhere (complying with black)
|
||||
# flake8-quotes => Use double quotes everywhere (complying with black)
|
||||
"Q0",
|
||||
# flake8-return => Consistent return statements
|
||||
"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",
|
||||
# flake8-simplify => Simpler code
|
||||
"SIM",
|
||||
# flake8-todos => unify TODOs
|
||||
# flake8-todos => Unify TODOs
|
||||
"T00",
|
||||
# flake8-unused-arguments => declared function arguments must be used
|
||||
# flake8-unused-arguments => Declared function arguments must be used
|
||||
"U100",
|
||||
# pandas-vet => Idiomatic `pandas`
|
||||
"PD0",
|
||||
# pep8-naming => PEP8 naming conventions
|
||||
"N8",
|
||||
# pydoclint => docstring matches implementation
|
||||
# pydoclint => Docstring matches implementation
|
||||
"DOC",
|
||||
# ========================================
|
||||
# `ruff` only (no working `flake8` plugin)
|
||||
|
|
@ -282,7 +282,7 @@ ignore = []
|
|||
extend-ignore = [
|
||||
# `ruff`'s A003 does this better, as it only flags actual shadowing
|
||||
"A003",
|
||||
# Too long line => duplicate with E501.
|
||||
# Too long line => Duplicate with E501.
|
||||
"B950",
|
||||
# PEP 257 documents the arguments of `__init__()` in its own docstring.
|
||||
"DOC301",
|
||||
|
|
@ -500,17 +500,17 @@ select = [
|
|||
# ===================================
|
||||
# flake8-builtins => No shadowing of builtins
|
||||
"A",
|
||||
# flake8-annotations => enforce type checking for functions
|
||||
# flake8-annotations => Enforce type checking for functions
|
||||
"ANN0", "ANN2",
|
||||
# flake8-unused-arguments ("U100") => declared function arguments must be used
|
||||
# flake8-unused-arguments ("U100") => Declared function arguments must be used
|
||||
"ARG",
|
||||
# flake8-bugbear => opinionated bugs and design flaws
|
||||
# flake8-bugbear => Opinionated bugs and design flaws
|
||||
"B",
|
||||
# flake8-comprehensions => better comprehensions
|
||||
# flake8-comprehensions => Better comprehensions
|
||||
"C4",
|
||||
# mccabe => cyclomatic complexity
|
||||
# mccabe => Cyclomatic complexity
|
||||
"C90",
|
||||
# flake8-commas ("C8") => better comma placements
|
||||
# flake8-commas ("C8") => Better comma placements
|
||||
"COM",
|
||||
# flake8-docstrings => PEP257 compliance
|
||||
"D",
|
||||
|
|
@ -518,7 +518,7 @@ select = [
|
|||
"E", "W",
|
||||
# flake8-errmsg => Shorter tracebacks
|
||||
"EM",
|
||||
# pyflakes => basic errors
|
||||
# pyflakes => Basic errors
|
||||
"F",
|
||||
# flake8-boolean-trap => Keyword-only flags
|
||||
"FBT",
|
||||
|
|
@ -528,28 +528,28 @@ select = [
|
|||
"N",
|
||||
# pandas-vet => Idiomatic `pandas`
|
||||
"PD",
|
||||
# flake8-pytest-style => enforce a consistent style with pytest
|
||||
# flake8-pytest-style => Enforce a consistent style with pytest
|
||||
"PT",
|
||||
# flake8-quotes => use double quotes everywhere
|
||||
# flake8-quotes => Use double quotes everywhere
|
||||
"Q",
|
||||
# flake8-return ("R5") => Consistent return statements
|
||||
"RET",
|
||||
# flake8-bandit => common security issues
|
||||
# flake8-bandit => Common security issues
|
||||
"S",
|
||||
# flake8-simplify => Simpler code
|
||||
"SIM",
|
||||
# flake8-debugger => no debugger usage
|
||||
# flake8-debugger => No debugger usage
|
||||
"T10",
|
||||
# flake8-todos => unify TODOs
|
||||
# flake8-todos => Unify TODOs
|
||||
"TD",
|
||||
# =======================================
|
||||
# Violations not covered by `flake8` above
|
||||
# =======================================
|
||||
# eradicate => no commented-out code
|
||||
# eradicate => No commented-out code
|
||||
"ERA",
|
||||
# refurb => Modern idioms
|
||||
"FURB",
|
||||
# isort => imports are sorted
|
||||
# isort => Imports are sorted
|
||||
"I",
|
||||
# flake8-import-conventions => Unified import aliases
|
||||
"ICN",
|
||||
|
|
@ -565,7 +565,7 @@ select = [
|
|||
"RUF",
|
||||
# flake8-self => No access to private members from outside
|
||||
"SLF",
|
||||
# flake8-print => no `print()`
|
||||
# flake8-print => No `print()`
|
||||
"T20",
|
||||
# pyupgrade => Modern syntax for the targeted Python version
|
||||
"UP",
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
" -> created 38 pixels\n",
|
||||
"Creating grid with a side length of 1414 meters\n",
|
||||
" -> created 24 pixels\n",
|
||||
"=> assigned 358 out of 48058 addresses in Lyon\n",
|
||||
"=> Assigned 358 out of 48058 addresses in Lyon\n",
|
||||
"\n",
|
||||
"Creating grids for Paris\n",
|
||||
"Creating grid with a side length of 707 meters\n",
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
" -> created 111 pixels\n",
|
||||
"Creating grid with a side length of 1414 meters\n",
|
||||
" -> created 66 pixels\n",
|
||||
"=> assigned 1133 out of 108135 addresses in Paris\n",
|
||||
"=> Assigned 1133 out of 108135 addresses in Paris\n",
|
||||
"\n",
|
||||
"Creating grids for Bordeaux\n",
|
||||
"Creating grid with a side length of 707 meters\n",
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
" -> created 22 pixels\n",
|
||||
"Creating grid with a side length of 1414 meters\n",
|
||||
" -> created 15 pixels\n",
|
||||
"=> assigned 123 out of 21742 addresses in Bordeaux\n"
|
||||
"=> Assigned 123 out of 21742 addresses in Bordeaux\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def tactical_heuristic( # noqa:C901,D417,DOC001
|
|||
TIME_STEP: length of one time step in minutes; defaults to `60`
|
||||
|
||||
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.
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def gridify() -> None: # pragma: no cover note:b1f68d24
|
|||
.count()
|
||||
)
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ class Order(meta.Base):
|
|||
def corrected(self) -> bool:
|
||||
"""If any timestamp was corrected as compared to the original data."""
|
||||
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.restaurant_notified_at_corrected
|
||||
or self.restaurant_confirmed_at_corrected
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ def stl( # noqa:C901,PLR0912,PLR0913,PLR0915
|
|||
raise ValueError(msg)
|
||||
else:
|
||||
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
|
||||
|
||||
if nl is not None:
|
||||
|
|
@ -120,7 +120,7 @@ def stl( # noqa:C901,PLR0912,PLR0913,PLR0915
|
|||
raise ValueError(msg)
|
||||
elif frequency % 2 == 0:
|
||||
nl = frequency + 1
|
||||
else: # pragma: no cover => hard to construct edge case
|
||||
else: # pragma: no cover => Hard to construct edge case
|
||||
nl = frequency
|
||||
|
||||
if ds not in {0, 1}:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class RealtimeARIMAModel(base.ForecastingModelABC):
|
|||
decomposed_training_ts = methods.decomposition.stl(
|
||||
time_series=training_ts,
|
||||
frequency=frequency,
|
||||
# "Periodic" `ns` parameter => same seasonal component value
|
||||
# "Periodic" `ns` parameter => Same seasonal component value
|
||||
# for observations of the same lag.
|
||||
ns=999,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class VerticalARIMAModel(base.ForecastingModelABC):
|
|||
decomposed_training_ts = methods.decomposition.stl(
|
||||
time_series=training_ts,
|
||||
frequency=frequency,
|
||||
# "Periodic" `ns` parameter => same seasonal component value
|
||||
# "Periodic" `ns` parameter => Same seasonal component value
|
||||
# for observations of the same lag.
|
||||
ns=999,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ def make_order(make_address, make_courier, make_customer, make_restaurant):
|
|||
customer=make_customer(), # assume a unique `Customer` per order
|
||||
courier=courier,
|
||||
pickup_address=restaurant.address, # no `Address` history
|
||||
delivery_address=make_address(), # unique `Customer` => new `Address`
|
||||
delivery_address=make_address(), # unique `Customer` => New `Address`
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue