Skip to content

Commit 8e2e9c0

Browse files
committed
Rename internal constant to follow naming conventions
Constants should be in ALL_CAPS. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 55a9251 commit 8e2e9c0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/frequenz/repo/config/nox/config.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def path_args(
147147
return list(str(p) for p in _util.existing_paths(paths))
148148

149149

150-
_config: Config | None = None
150+
_CONFIG: Config | None = None
151151
"""The global configuration object."""
152152

153153

@@ -159,8 +159,8 @@ def get() -> Config:
159159
Returns:
160160
The global configuration object.
161161
"""
162-
assert _config is not None, "You must call configure() before using this function"
163-
return _config
162+
assert _CONFIG is not None, "You must call configure() before using this function"
163+
return _CONFIG
164164

165165

166166
@overload
@@ -204,7 +204,7 @@ def configure(
204204
This is only necessary if you want to avoid using the default provided
205205
sessions and use your own.
206206
"""
207-
global _config # pylint: disable=global-statement
207+
global _CONFIG # pylint: disable=global-statement
208208

209209
# We need to make sure sessions are imported, otherwise they won't be visible to nox.
210210
if import_default_sessions:
@@ -213,23 +213,23 @@ def configure(
213213

214214
match conf:
215215
case Config():
216-
_config = conf
216+
_CONFIG = conf
217217
case RepositoryType() as repo_type:
218218
# pylint: disable=import-outside-toplevel,cyclic-import
219219
from . import default
220220

221221
match repo_type:
222222
case RepositoryType.ACTOR:
223-
_config = default.actor_config
223+
_CONFIG = default.actor_config
224224
case RepositoryType.API:
225-
_config = default.api_config
225+
_CONFIG = default.api_config
226226
case RepositoryType.APP:
227-
_config = default.app_config
227+
_CONFIG = default.app_config
228228
case RepositoryType.LIB:
229-
_config = default.lib_config
229+
_CONFIG = default.lib_config
230230
case RepositoryType.MODEL:
231-
_config = default.model_config
231+
_CONFIG = default.model_config
232232
case _ as unhandled:
233233
assert_never(unhandled)
234234

235-
_nox.options.sessions = _config.sessions
235+
_nox.options.sessions = _CONFIG.sessions

0 commit comments

Comments
 (0)