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
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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",
]
Expand Down Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions src/frequenz/repo/config/nox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""


Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Loading