Refer to sources with "See:" in comments
This commit is contained in:
parent
f90f263dab
commit
c18fc2ba59
3 changed files with 17 additions and 17 deletions
|
|
@ -150,7 +150,7 @@ verify-db = [
|
||||||
|
|
||||||
|
|
||||||
[tool.autoflake]
|
[tool.autoflake]
|
||||||
# Source: https://github.com/PyCQA/autoflake#configuration
|
# See: https://github.com/PyCQA/autoflake#configuration
|
||||||
|
|
||||||
in-place = true
|
in-place = true
|
||||||
recursive = true
|
recursive = true
|
||||||
|
|
@ -171,7 +171,7 @@ line-length = 88
|
||||||
|
|
||||||
|
|
||||||
[tool.coverage]
|
[tool.coverage]
|
||||||
# Source: https://coverage.readthedocs.io/en/latest/config.html
|
# See: https://coverage.readthedocs.io/en/latest/config.html
|
||||||
|
|
||||||
|
|
||||||
[tool.coverage.paths]
|
[tool.coverage.paths]
|
||||||
|
|
@ -201,7 +201,7 @@ source = ["velofy"]
|
||||||
|
|
||||||
|
|
||||||
[tool.flake8]
|
[tool.flake8]
|
||||||
# Source: https://flake8.pycqa.org/en/latest/user/configuration.html
|
# See: https://flake8.pycqa.org/en/latest/user/configuration.html
|
||||||
|
|
||||||
# Include error classes only explicitly
|
# Include error classes only explicitly
|
||||||
# to avoid forward compatibility issues
|
# to avoid forward compatibility issues
|
||||||
|
|
@ -330,7 +330,7 @@ extend-ignore = [
|
||||||
# PEP 257 documents the arguments of `__init__()` in its own docstring
|
# PEP 257 documents the arguments of `__init__()` in its own docstring
|
||||||
"DOC301",
|
"DOC301",
|
||||||
# Comply with black's style
|
# Comply with black's style
|
||||||
# Source: https://github.com/psf/black/blob/master/docs/compatible_configs.md#flake8
|
# See: https://github.com/psf/black/blob/master/docs/compatible_configs.md#flake8
|
||||||
"E203", "W503",
|
"E203", "W503",
|
||||||
# `ruff`'s FBT003 does this better, as it allows builtins like `setattr()`
|
# `ruff`'s FBT003 does this better, as it allows builtins like `setattr()`
|
||||||
"FBT003",
|
"FBT003",
|
||||||
|
|
@ -364,11 +364,11 @@ per-file-ignores = [
|
||||||
]
|
]
|
||||||
|
|
||||||
# 10 as recommended by Thomas McCabe, the metric's inventor, and the NIST
|
# 10 as recommended by Thomas McCabe, the metric's inventor, and the NIST
|
||||||
# Source: https://en.wikipedia.org/wiki/Cyclomatic_complexity#Limiting_complexity_during_development
|
# See: https://en.wikipedia.org/wiki/Cyclomatic_complexity#Limiting_complexity_during_development
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
|
||||||
# Comply with black's style
|
# Comply with black's style
|
||||||
# Source: https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length
|
# See: https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length
|
||||||
max-line-length = 88
|
max-line-length = 88
|
||||||
|
|
||||||
# Preview the code lines that cause errors
|
# Preview the code lines that cause errors
|
||||||
|
|
@ -382,7 +382,7 @@ check-yield-types = false
|
||||||
# flake8-docstrings
|
# flake8-docstrings
|
||||||
docstring-convention = "google"
|
docstring-convention = "google"
|
||||||
# flake8-quotes
|
# flake8-quotes
|
||||||
# Source: https://github.com/zheller/flake8-quotes#configuration
|
# See: https://github.com/zheller/flake8-quotes#configuration
|
||||||
avoid-escape = true
|
avoid-escape = true
|
||||||
docstring-quotes = "double"
|
docstring-quotes = "double"
|
||||||
inline-quotes = "double"
|
inline-quotes = "double"
|
||||||
|
|
@ -404,7 +404,7 @@ pytest-parametrize-values-type = "list"
|
||||||
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
# Source: https://pycqa.github.io/isort/docs/configuration/options.html
|
# See: https://pycqa.github.io/isort/docs/configuration/options.html
|
||||||
|
|
||||||
atomic = true
|
atomic = true
|
||||||
case_sensitive = false # Implied by "force_alphabetical_sort_within_sections"
|
case_sensitive = false # Implied by "force_alphabetical_sort_within_sections"
|
||||||
|
|
@ -414,7 +414,7 @@ lines_after_imports = 2
|
||||||
remove_redundant_aliases = true
|
remove_redundant_aliases = true
|
||||||
|
|
||||||
# Comply with black's style
|
# Comply with black's style
|
||||||
# Source: https://github.com/psf/black/blob/master/docs/compatible_configs.md#isort
|
# See: https://github.com/psf/black/blob/master/docs/compatible_configs.md#isort
|
||||||
ensure_newline_before_comments = true
|
ensure_newline_before_comments = true
|
||||||
force_grid_wrap = 0
|
force_grid_wrap = 0
|
||||||
include_trailing_comma = true
|
include_trailing_comma = true
|
||||||
|
|
@ -424,13 +424,13 @@ use_parentheses = true
|
||||||
|
|
||||||
# Comply with Google's Python Style Guide
|
# Comply with Google's Python Style Guide
|
||||||
# => All imports go on a single line
|
# => All imports go on a single line
|
||||||
# Source: https://google.github.io/styleguide/pyguide.html#313-imports-formatting
|
# See: https://google.github.io/styleguide/pyguide.html#313-imports-formatting
|
||||||
force_single_line = true
|
force_single_line = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
# Source: https://mypy.readthedocs.io/en/stable/config_file.html
|
# See: https://mypy.readthedocs.io/en/stable/config_file.html
|
||||||
|
|
||||||
cache_dir = ".cache/mypy"
|
cache_dir = ".cache/mypy"
|
||||||
|
|
||||||
|
|
@ -524,7 +524,7 @@ ignore_missing_imports = true
|
||||||
|
|
||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
# Source: https://microsoft.github.io/pyright/#/configuration
|
# See: https://microsoft.github.io/pyright/#/configuration
|
||||||
|
|
||||||
# Check against the oldest supported Python version, not the one running `pyright`
|
# Check against the oldest supported Python version, not the one running `pyright`
|
||||||
pythonVersion = "3.13"
|
pythonVersion = "3.13"
|
||||||
|
|
@ -535,7 +535,7 @@ useLibraryCodeForTypes = false
|
||||||
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
# Source: https://docs.pytest.org/en/stable/reference/reference.html#ini-options-ref
|
# See: https://docs.pytest.org/en/stable/reference/reference.html#ini-options-ref
|
||||||
|
|
||||||
cache_dir = ".cache/pytest"
|
cache_dir = ".cache/pytest"
|
||||||
|
|
||||||
|
|
@ -571,7 +571,7 @@ markers = [
|
||||||
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
# Source: https://docs.astral.sh/ruff/
|
# See: https://docs.astral.sh/ruff/
|
||||||
|
|
||||||
cache-dir = ".cache/ruff"
|
cache-dir = ".cache/ruff"
|
||||||
|
|
||||||
|
|
@ -807,7 +807,7 @@ convention = "google"
|
||||||
|
|
||||||
|
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
# Source: https://docs.astral.sh/uv/reference/settings/
|
# See: https://docs.astral.sh/uv/reference/settings/
|
||||||
|
|
||||||
required-version = ">=0.13.10,<0.14.0" # Same range as "uv_build" above
|
required-version = ">=0.13.10,<0.14.0" # Same range as "uv_build" above
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ class Path(meta.Base):
|
||||||
)
|
)
|
||||||
# Without "alternatives" and "waypoints",
|
# Without "alternatives" and "waypoints",
|
||||||
# the `response` has exactly one "route" with exactly one "leg"
|
# the `response` has exactly one "route" with exactly one "leg"
|
||||||
# Source: https://developers.google.com/maps/documentation/directions/get-directions#Legs # noqa:E501
|
# See: https://developers.google.com/maps/documentation/directions/get-directions#Legs # noqa:E501
|
||||||
route = response[0]["legs"][0]
|
route = response[0]["legs"][0]
|
||||||
|
|
||||||
self.bicycle_distance = route["distance"]["value"]
|
self.bicycle_distance = route["distance"]["value"]
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ from rpy2.robjects import packages as r_packages
|
||||||
|
|
||||||
|
|
||||||
# R's console messages would clutter the output => Suppress them
|
# R's console messages would clutter the output => Suppress them
|
||||||
# Source: https://stackoverflow.com/a/63220287
|
# See: https://stackoverflow.com/a/63220287
|
||||||
r_callbacks.consolewrite_print = lambda *_args, **_kwargs: None # pragma: no cover
|
r_callbacks.consolewrite_print = lambda *_args, **_kwargs: None # pragma: no cover
|
||||||
r_callbacks.consolewrite_warnerror = lambda *_args, **_kwargs: None # pragma: no cover
|
r_callbacks.consolewrite_warnerror = lambda *_args, **_kwargs: None # pragma: no cover
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue