Skip to content

Commit cf3c5db

Browse files
authored
Minor fixes and improvements (#81)
- Add more cross-reference object inventories - Fix typo in comments - Run isort in benchmarks too - Disable pylint `unsubscriptable-object` check
2 parents e1943d5 + 57d6e32 commit cf3c5db

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
python -m pip install -e .[dev-noxfile]
5151
5252
- name: Run nox
53-
# To speed things up a bit we use the speciall ci_checks_max session
53+
# To speed things up a bit we use the special ci_checks_max session
5454
# that uses the same venv to run multiple linting sessions
5555
run: nox -e ci_checks_max pytest_min
5656
timeout-minutes: 60

cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
python -m pip install -e .[dev-noxfile]
5151
5252
- name: Run nox
53-
# To speed things up a bit we use the speciall ci_checks_max session
53+
# To speed things up a bit we use the special ci_checks_max session
5454
# that uses the same venv to run multiple linting sessions
5555
run: nox -e ci_checks_max pytest_min
5656
timeout-minutes: 10

cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ plugins:
109109
# TODO(cookiecutter): You might want to add other external references here
110110
# See https://mkdocstrings.github.io/python/usage/#import for details
111111
- https://docs.python.org/3/objects.inv
112+
{%- if cookiecutter.type in ("actor", "app", "model") %}
113+
- https://frequenz-floss.github.io/frequenz-channels-python/v0.14/objects.inv
114+
- https://frequenz-floss.github.io/frequenz-sdk-python/v0.20/objects.inv
115+
{%- elif cookiecutter.type == "api" %}
116+
- https://grpc.github.io/grpc/python/objects.inv
117+
{%- endif %}
112118
- https://typing-extensions.readthedocs.io/en/stable/objects.inv
113119
- search
114120
- section-index

cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ requires-python = ">= 3.11, < 4"
3434
{%- if cookiecutter.type in ("app", "actor", "model") %}
3535
dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
3636
"typing-extensions == 4.5.0",
37+
# Make sure to update the mkdocs.yml file when
38+
# changing the version
39+
# (plugins.mkdocstrings.handlers.python.import)
3740
"frequenz-sdk == 0.20.0",
3841
]
3942
{%- elif cookiecutter.type == "api" %}
@@ -114,7 +117,7 @@ include = '\.pyi?$'
114117
profile = "black"
115118
line_length = 88
116119
{#- We don't include "py" here for API because we don't want to check generated files #}
117-
src_paths = ["src", "examples", "tests"]
120+
src_paths = ["benchmarks", "examples", "src", "tests"]
118121

119122
[tool.pylint.similarities]
120123
ignore-comments = ['yes']
@@ -128,6 +131,9 @@ disable = [
128131
# disabled because it conflicts with isort
129132
"wrong-import-order",
130133
"ungrouped-imports",
134+
# pylint's unsubscriptable check is buggy and is not needed because
135+
# it is a type-check, for which we already have mypy.
136+
"unsubscriptable-object",
131137
]
132138

133139
[tool.pytest.ini_options]

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ disable = [
118118
# disabled because it conflicts with isort
119119
"wrong-import-order",
120120
"ungrouped-imports",
121+
# pylint's unsubscriptable check is buggy and is not needed because
122+
# it is a type-check, for which we already have mypy.
123+
"unsubscriptable-object",
121124
]
122125

123126
[[tool.mypy.overrides]]

0 commit comments

Comments
 (0)