From d8c538b1ab9ad20914d45c851f3b67902d5b75c4 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Mon, 5 Oct 2026 11:58:37 +0200 Subject: [PATCH 1/2] LCORE-4200: String concat refactoring --- src/utils/token_counter.py | 8 ++++---- tests/unit/models/config/test_cors.py | 4 ++-- tests/unit/utils/test_ogx_version.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils/token_counter.py b/src/utils/token_counter.py index 94f0667d0..3ff84815b 100644 --- a/src/utils/token_counter.py +++ b/src/utils/token_counter.py @@ -33,8 +33,8 @@ def __str__(self) -> str: """ return ( f"{self.__class__.__name__}: " - + f"input_tokens: {self.input_tokens} " - + f"output_tokens: {self.output_tokens} " - + f"counted: {self.input_tokens_counted} " - + f"LLM calls: {self.llm_calls}" + f"input_tokens: {self.input_tokens} " + f"output_tokens: {self.output_tokens} " + f"counted: {self.input_tokens_counted} " + f"LLM calls: {self.llm_calls}" ) diff --git a/tests/unit/models/config/test_cors.py b/tests/unit/models/config/test_cors.py index 044bd4a22..a9c54bdf2 100644 --- a/tests/unit/models/config/test_cors.py +++ b/tests/unit/models/config/test_cors.py @@ -90,8 +90,8 @@ def test_cors_improper_configuration() -> None: """ expected = ( "Value error, Invalid CORS configuration: " - + "allow_credentials can not be set to true when allow origins contains the '\\*' wildcard." - + "Use explicit origins or disable credentials." + "allow_credentials can not be set to true when allow origins contains the '\\*' wildcard." + "Use explicit origins or disable credentials." ) with pytest.raises(ValueError, match=expected): diff --git a/tests/unit/utils/test_ogx_version.py b/tests/unit/utils/test_ogx_version.py index c28722ee6..1931c04fe 100644 --- a/tests/unit/utils/test_ogx_version.py +++ b/tests/unit/utils/test_ogx_version.py @@ -62,7 +62,7 @@ async def test_check_ogx_version_too_small_version( expected_exception_msg = ( f"OGX version >= {MINIMAL_SUPPORTED_OGX_VERSION} " - + "is required, but 0.0.0 is used" + "is required, but 0.0.0 is used" ) # test if the version is checked with pytest.raises(InvalidOgxVersionException, match=expected_exception_msg): @@ -84,7 +84,7 @@ async def _check_version_must_fail(mock_client: Any, bigger_version: Version) -> expected_exception_msg = ( f"OGX version <= {MAXIMAL_SUPPORTED_OGX_VERSION} is required, " - + f"but {bigger_version} is used" + f"but {bigger_version} is used" ) # test if the version is checked with pytest.raises(InvalidOgxVersionException, match=expected_exception_msg): From 49971460bbc0a662ec3e6d2e8ef9196b024a98cd Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Mon, 5 Oct 2026 12:01:41 +0200 Subject: [PATCH 2/2] Enabled ISC rules group on CI --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c6aeb564..faecd45f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ line-length = 88 extend-exclude = ["tests/profiles/syntax_error.py"] [tool.ruff.lint] -extend-select = ["C", "FA", "FLY", "I", "ISC001", "TID251", "UP006", "UP007", "UP008", "UP010", "UP012", "UP017", "UP024", "UP035", "UP040", "UP041", "RUF100", "B009", "B010", "B011", "BLE", "DTZ005", "D202", "PLR1733", "RUF022", "PLW1510", "TC004", "PIE790", "PERF402", "FURB129", "RET501", "LOG"] +extend-select = ["C", "FA", "FLY", "I", "ISC", "TID251", "UP006", "UP007", "UP008", "UP010", "UP012", "UP017", "UP024", "UP035", "UP040", "UP041", "RUF100", "B009", "B010", "B011", "BLE", "DTZ005", "D202", "PLR1733", "RUF022", "PLW1510", "TC004", "PIE790", "PERF402", "FURB129", "RET501", "LOG"] ignore = ["UP047", "UP045", "S", "C901", "RUF", "SIM", "B017", "TRY004", "TRY201", "TRY203", "TRY401", "B008", "EXE001", "G201", "ISC004", "PYI034", "PYI064"] [tool.ruff.lint.flake8-tidy-imports.banned-api]