style: adopt ruff (format + lint) at 88, replacing black/isort/flake8

Format-only: Python files are AST-identical apart from import order.
pre-commit end-of-file/trailing-whitespace fixes applied repo-wide.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
golem
2026-10-04 20:39:30 -06:00
co-authored by Claude Opus 5.5
parent a6e09a5796
commit bca4c38f98
19 changed files with 63 additions and 88 deletions
-1
View File
@@ -15,4 +15,3 @@ Run test by keyword:
Run test by directory:
pytest <dirname>
-1
View File
@@ -2,4 +2,3 @@ root_option = root_option_val
[app]
sub_option = sub_option_val
-1
View File
@@ -2,4 +2,3 @@ root_option = string(max=255, default='def_string')
[app]
sub_option = string(max=255, default='def_sub')
-1
View File
@@ -2,4 +2,3 @@ root_option = root_option_val
[app]
sub_option = sub_option_val
-1
View File
@@ -3,4 +3,3 @@ int_option = integer(min=0, max=100)
[app]
sub_option = string(max=255, default='def_sub')
-1
View File
@@ -1,2 +1 @@
root_option = invalid(max=255, default='def_string')
+15 -15
View File
@@ -32,18 +32,18 @@ def sample_invalid_configspec_filepath():
class TestConfig_e2e:
def test_allows_reading_ini_and_no_spec(self, sample_configini_filepath):
cfg = Config(configini_filepath=sample_configini_filepath)
assert (
cfg["root_option"] == "root_option_val"
), "expecting default from config.spec (didnt get)"
assert (
cfg["app"]["sub_option"] == "sub_option_val"
), "expecting default for sub option"
assert cfg["root_option"] == "root_option_val", (
"expecting default from config.spec (didnt get)"
)
assert cfg["app"]["sub_option"] == "sub_option_val", (
"expecting default for sub option"
)
def test_allows_reading_spec_and_no_ini(self, sample_configspec_filepath):
cfg = Config(configspec_filepath=sample_configspec_filepath)
assert (
cfg["root_option"] == "def_string"
), "expecting default from config.spec (didnt get)"
assert cfg["root_option"] == "def_string", (
"expecting default from config.spec (didnt get)"
)
# NOTE(MG) Changed the functionality to not do it this way.
# def test_constructor_fails_with_invalid_spec(
@@ -71,9 +71,9 @@ class TestConfig_e2e:
assert cfg["root_option"] == "newval"
cfg["app"]["sub_option"] = "another_new_val"
assert (
cfg["app"]["sub_option"] == "another_new_val"
), "expecting default for sub option"
assert cfg["app"]["sub_option"] == "another_new_val", (
"expecting default for sub option"
)
def test_can_set_option_without_config(self):
cfg = Config()
@@ -86,7 +86,7 @@ class TestConfig_e2e:
def test_uses_spec_as_defaults(self, sample_configspec_filepath):
cfg = Config(configspec_filepath=sample_configspec_filepath)
assert (
cfg["root_option"] == "def_string"
), "expecting default from config.spec (didnt get)"
assert cfg["root_option"] == "def_string", (
"expecting default from config.spec (didnt get)"
)
assert cfg["app"]["sub_option"] == "def_sub", "expecting default for sub option"
-1
View File
@@ -1,4 +1,3 @@
[pytest]
filterwarnings =
ignore::DeprecationWarning