mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-07 21:08:34 +03:00
refactor: enforce BasedPyright strict type checking (#5158)
This commit is contained in:
@@ -7,6 +7,7 @@ from nanobot.config.loader import (
|
||||
_resolve_env_vars,
|
||||
load_config,
|
||||
resolve_config_env_vars,
|
||||
resolve_env_refs,
|
||||
save_config,
|
||||
)
|
||||
from nanobot.config.schema import Config
|
||||
@@ -50,6 +51,12 @@ class TestResolveEnvVars:
|
||||
_resolve_env_vars("${DOES_NOT_EXIST}")
|
||||
|
||||
|
||||
class TestResolveSingleEnvRefs:
|
||||
@pytest.mark.parametrize("value", [None, 42, True, {"key": "value"}])
|
||||
def test_non_string_values_pass_through_unchanged(self, value):
|
||||
assert resolve_env_refs(value) is value
|
||||
|
||||
|
||||
class TestResolveConfig:
|
||||
def test_resolves_env_vars_in_config(self, tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("TEST_API_KEY", "resolved-key")
|
||||
|
||||
Reference in New Issue
Block a user