diff --git a/pyproject.toml b/pyproject.toml index 47d03225..cf57c4fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # Copyright © 2023 Frequenz Energy-as-a-Service GmbH [build-system] -requires = ["setuptools == 80.9.0", "setuptools_scm[toml] == 9.2.0"] +requires = ["setuptools == 80.9.0", "setuptools_scm[toml] == 9.2.2"] build-backend = "setuptools.build_meta" [project] @@ -70,7 +70,7 @@ extra-lint-examples = [ dev-flake8 = [ "flake8 == 7.3.0", "flake8-docstrings == 1.7.0", - "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml + "flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml "pydoclint == 0.7.3", "pydocstyle == 6.3.0", ] @@ -105,7 +105,7 @@ dev-pylint = [ ] dev-pytest = [ "pytest == 8.4.2", - "pylint == 4.0.0", # We need this to check for the examples + "pylint == 4.0.4", # We need this to check for the examples "cookiecutter == 2.6.0", # For checking the cookiecutter scripts "jinja2 == 3.1.6", # For checking the cookiecutter scripts "sybil >= 6.1.1, < 10", # Should be consistent with the extra-lint-examples dependency diff --git a/src/frequenz/repo/config/nox/config.py b/src/frequenz/repo/config/nox/config.py index 814fae7b..0e97602b 100644 --- a/src/frequenz/repo/config/nox/config.py +++ b/src/frequenz/repo/config/nox/config.py @@ -147,7 +147,7 @@ def path_args( return list(str(p) for p in _util.existing_paths(paths)) -_config: Config | None = None +_CONFIG: Config | None = None """The global configuration object.""" @@ -159,8 +159,8 @@ def get() -> Config: Returns: The global configuration object. """ - assert _config is not None, "You must call configure() before using this function" - return _config + assert _CONFIG is not None, "You must call configure() before using this function" + return _CONFIG @overload @@ -204,7 +204,7 @@ def configure( This is only necessary if you want to avoid using the default provided sessions and use your own. """ - global _config # pylint: disable=global-statement + global _CONFIG # pylint: disable=global-statement # We need to make sure sessions are imported, otherwise they won't be visible to nox. if import_default_sessions: @@ -213,23 +213,23 @@ def configure( match conf: case Config(): - _config = conf + _CONFIG = conf case RepositoryType() as repo_type: # pylint: disable=import-outside-toplevel,cyclic-import from . import default match repo_type: case RepositoryType.ACTOR: - _config = default.actor_config + _CONFIG = default.actor_config case RepositoryType.API: - _config = default.api_config + _CONFIG = default.api_config case RepositoryType.APP: - _config = default.app_config + _CONFIG = default.app_config case RepositoryType.LIB: - _config = default.lib_config + _CONFIG = default.lib_config case RepositoryType.MODEL: - _config = default.model_config + _CONFIG = default.model_config case _ as unhandled: assert_never(unhandled) - _nox.options.sessions = _config.sessions + _nox.options.sessions = _CONFIG.sessions