diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eaaf075..38b4f22 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Print environment (debug) run: env @@ -119,6 +122,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 with: @@ -219,6 +225,9 @@ jobs: name: Build distribution packages runs-on: ubuntu-20.04 steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 with: @@ -251,17 +260,24 @@ jobs: needs: ["build"] runs-on: ubuntu-20.04 steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - 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: @@ -276,14 +292,14 @@ jobs: if: github.event_name != 'push' runs-on: ubuntu-20.04 steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - 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: @@ -318,14 +334,14 @@ jobs: permissions: contents: write steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - 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: diff --git a/pyproject.toml b/pyproject.toml index d08a45e..4e7b9ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -46,45 +46,45 @@ email = "floss@frequenz.com" [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]", diff --git a/src/frequenz/core/asyncio/_service.py b/src/frequenz/core/asyncio/_service.py index 503b715..c7d4569 100644 --- a/src/frequenz/core/asyncio/_service.py +++ b/src/frequenz/core/asyncio/_service.py @@ -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 diff --git a/src/frequenz/core/asyncio/_task_group.py b/src/frequenz/core/asyncio/_task_group.py index 10398e8..26769ef 100644 --- a/src/frequenz/core/asyncio/_task_group.py +++ b/src/frequenz/core/asyncio/_task_group.py @@ -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 diff --git a/src/frequenz/core/typing.py b/src/frequenz/core/typing.py index 201b057..9a8d0d6 100644 --- a/src/frequenz/core/typing.py +++ b/src/frequenz/core/typing.py @@ -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, ...], @@ -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: diff --git a/tests/math/test_interval.py b/tests/math/test_interval.py index f81cf5a..7cc2097 100644 --- a/tests/math/test_interval.py +++ b/tests/math/test_interval.py @@ -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,