Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Setup Git
uses: frequenz-floss/[email protected]

- name: Print environment (debug)
run: env

Expand Down Expand Up @@ -119,6 +122,9 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Setup Git
uses: frequenz-floss/[email protected]

- name: Fetch sources
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -219,6 +225,9 @@ jobs:
name: Build distribution packages
runs-on: ubuntu-20.04
steps:
- name: Setup Git
uses: frequenz-floss/[email protected]

- name: Fetch sources
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -251,17 +260,24 @@ jobs:
needs: ["build"]
runs-on: ubuntu-20.04
steps:
- name: Setup Git
uses: frequenz-floss/[email protected]

- name: Fetch sources
uses: actions/checkout@v4

- name: Download package
uses: actions/download-artifact@v4
with:
name: dist-packages
path: dist

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up docker-buildx
uses: docker/setup-buildx-action@v3

- name: Test Installation
uses: docker/build-push-action@v6
with:
Expand All @@ -276,14 +292,14 @@ jobs:
if: github.event_name != 'push'
runs-on: ubuntu-20.04
steps:
- name: Setup Git
uses: frequenz-floss/[email protected]

- name: Fetch sources
uses: actions/checkout@v4
with:
submodules: true

- name: Setup Git user and e-mail
uses: frequenz-floss/setup-git-user@v2

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -318,14 +334,14 @@ jobs:
permissions:
contents: write
steps:
- name: Setup Git
uses: frequenz-floss/[email protected]

- name: Fetch sources
uses: actions/checkout@v4
with:
submodules: true

- name: Setup Git user and e-mail
uses: frequenz-floss/setup-git-user@v2

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
42 changes: 21 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
requires = [
"setuptools == 68.1.0",
"setuptools_scm[toml] == 7.1.0",
"frequenz-repo-config[lib] == 0.9.2",
"frequenz-repo-config[lib] == 0.10.0",
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -46,45 +46,45 @@ email = "[email protected]"

[project.optional-dependencies]
dev-flake8 = [
"flake8 == 7.1.0",
"flake8 == 7.1.1",
"flake8-docstrings == 1.7.0",
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
"pydoclint == 0.5.3",
"pydoclint == 0.5.9",
"pydocstyle == 6.3.0",
]
dev-formatting = ["black == 24.4.2", "isort == 5.13.2"]
dev-formatting = ["black == 24.8.0", "isort == 5.13.2"]
dev-mkdocs = [
"Markdown == 3.6.0",
"black == 24.4.2",
"mike == 2.1.2",
"Markdown == 3.7",
"black == 24.8.0",
"mike == 2.1.3",
"mkdocs-gen-files == 0.5.0",
"mkdocs-literate-nav == 0.6.1",
"mkdocs-macros-plugin == 1.0.5",
"mkdocs-material == 9.5.27",
"mkdocstrings[python] == 0.25.1",
"mkdocstrings-python == 1.10.5",
"frequenz-repo-config[lib] == 0.9.2",
"mkdocs-macros-plugin == 1.2.0",
"mkdocs-material == 9.5.39",
"mkdocstrings[python] == 0.26.1",
"mkdocstrings-python == 1.11.1",
"frequenz-repo-config[lib] == 0.10.0",
]
dev-mypy = [
"mypy == 1.10.1",
"types-Markdown == 3.6.0.20240316",
"mypy == 1.11.2",
"types-Markdown == 3.7.0.20240822",
# For checking the noxfile, docs/ script, and tests
"frequenz-core[dev-mkdocs,dev-noxfile,dev-pytest]",
]
dev-noxfile = ["nox == 2024.4.15", "frequenz-repo-config[lib] == 0.9.2"]
dev-noxfile = ["nox == 2024.4.15", "frequenz-repo-config[lib] == 0.10.0"]
dev-pylint = [
# dev-pytest already defines a dependency to pylint because of the examples
# For checking the noxfile, docs/ script, and tests
"frequenz-core[dev-mkdocs,dev-noxfile,dev-pytest]",
]
dev-pytest = [
"pytest == 8.2.2",
"pylint == 3.2.5", # We need this to check for the examples
"frequenz-repo-config[extra-lint-examples] == 0.9.2",
"pytest == 8.3.3",
"pylint == 3.3.1", # We need this to check for the examples
"frequenz-repo-config[extra-lint-examples] == 0.10.0",
"pytest-mock == 3.14.0",
"pytest-asyncio == 0.23.7",
"async-solipsism == 0.6",
"hypothesis == 6.104.2",
"pytest-asyncio == 0.24.0",
"async-solipsism == 0.7",
"hypothesis == 6.112.2",
]
dev = [
"frequenz-core[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
Expand Down
4 changes: 3 additions & 1 deletion src/frequenz/core/asyncio/_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,10 @@ def cancel(self, msg: str | None = None) -> None:
self._main_task.cancel(msg)
self._task_group.cancel(msg)

# We need to use noqa here because pydoclint can't figure out that rest is actually
# an instance of BaseExceptionGroup.
@override
async def stop(self, msg: str | None = None) -> None:
async def stop(self, msg: str | None = None) -> None: # noqa: DOC503
"""Stop this service.
This method cancels all running tasks spawned by this service and waits for them
Expand Down
4 changes: 3 additions & 1 deletion src/frequenz/core/asyncio/_task_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def cancel(self, msg: str | None = None) -> None:
for task in self._running:
task.cancel(msg)

async def stop(self, msg: str | None = None) -> None:
# We need to use noqa here because pydoclint can't figure out that rest is actually
# an instance of BaseExceptionGroup.
async def stop(self, msg: str | None = None) -> None: # noqa: DOC503
"""Stop this task group.
This method cancels all running tasks spawned by this group and waits for them
Expand Down
8 changes: 6 additions & 2 deletions src/frequenz/core/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ def decorator(inner_cls: TypeT) -> TypeT:
class _NoInitConstructibleMeta(type):
"""A metaclass that disables the __init__ constructor."""

def __new__(
# We need to use noqa here because pydoclint can't figure out that
# _get_no_init_constructible_error() returns a TypeError.
def __new__( # noqa: DOC503
mcs,
name: str,
bases: tuple[type, ...],
Expand Down Expand Up @@ -173,7 +175,9 @@ def __init__(
super().__init__(name, bases, namespace)
cls._no_init_constructible_error = kwargs.get("no_init_constructible_error")

def __call__(cls, *args: Any, **kwargs: Any) -> NoReturn:
# We need to use noqa here because pydoclint can't figure out that
# _get_no_init_constructible_error() returns a TypeError.
def __call__(cls, *args: Any, **kwargs: Any) -> NoReturn: # noqa: DOC503
"""Raise an error when the __init__ constructor is called.

Args:
Expand Down
2 changes: 1 addition & 1 deletion tests/math/test_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_invalid_range(start: LessThanComparable, end: LessThanComparable) -> No
),
],
)
def test_contains( # pylint: disable=too-many-arguments
def test_contains( # pylint: disable=too-many-arguments,too-many-positional-arguments
start: LessThanComparable,
end: LessThanComparable,
within: LessThanComparable,
Expand Down
Loading