From 043fdebf8d1cfd9af9f2c8a4fe9a26fa98b25664 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 20 Mar 2024 14:53:41 -0500 Subject: [PATCH 1/2] bump black, packaging versions This still doesn't change what's checked for in individual repos (LibraryValidator) --- .pre-commit-config.yaml | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f0ff4f..bebc219 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: hooks: - id: reuse - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.3.0 hooks: - id: black - repo: https://github.com/pycqa/pylint diff --git a/requirements.txt b/requirements.txt index 209c948..e649252 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: MIT -black==22.3.0 -packaging==20.3 +black==24.3.0 +packaging==22.0 pylint==2.11.1 pytest pyyaml>=5.4.1 From 244e29d668b3f0327ea80233c76a5f2859e3d0d1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 20 Mar 2024 15:01:39 -0500 Subject: [PATCH 2/2] pre-commit changes, yay --- adabot/lib/circuitpython_library_validators.py | 8 ++++---- tools/library_functions.py | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/adabot/lib/circuitpython_library_validators.py b/adabot/lib/circuitpython_library_validators.py index a28abd4..897a35b 100644 --- a/adabot/lib/circuitpython_library_validators.py +++ b/adabot/lib/circuitpython_library_validators.py @@ -567,7 +567,7 @@ def _validate_pre_commit_config_yaml(self, file_info): errors = [] black_repo = "repo: https://github.com/python/black" - black_version = "rev: 22.3.0" + black_version = "rev: 22.4.0" if black_repo not in text or black_version not in text: errors.append(ERROR_BLACK_VERSION) @@ -895,9 +895,9 @@ def validate_readthedocs(self, repo): return [ERROR_RTD_SUBPROJECT_FAILED] self.rtd_subprojects = {} for subproject in rtd_response.json()["subprojects"]: - self.rtd_subprojects[ - common_funcs.sanitize_url(subproject["repo"]) - ] = subproject + self.rtd_subprojects[common_funcs.sanitize_url(subproject["repo"])] = ( + subproject + ) repo_url = common_funcs.sanitize_url(repo["clone_url"]) if repo_url not in self.rtd_subprojects: return [ERROR_RTD_SUBPROJECT_MISSING] diff --git a/tools/library_functions.py b/tools/library_functions.py index 5d7328c..146b6f0 100644 --- a/tools/library_functions.py +++ b/tools/library_functions.py @@ -37,8 +37,7 @@ class LocalLibFunc(Protocol): def __call__( self, lib_path: StrPath, *args: Sequence[Any], **kwargs: dict[str, Any] - ) -> Any: - ... + ) -> Any: ... # pylint: disable=too-few-public-methods @@ -53,8 +52,7 @@ class RemoteLibFunc(Protocol): def __call__( self, lib_repo: Repository, *args: Sequence[Any], **kwargs: dict[str, Any] - ) -> Any: - ... + ) -> Any: ... def in_lib_path(func: LocalLibFunc) -> LocalLibFunc: