Skip to content

Commit 5cc9340

Browse files
authored
Merge pull request #2845 from tisnik/lcore-4200-enable-isc-ruff-rule-on-ci-1
LCORE-4200: Enable ISC rule group on CI
2 parents 649e1ad + 4997146 commit 5cc9340

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ line-length = 88
257257
extend-exclude = ["tests/profiles/syntax_error.py"]
258258

259259
[tool.ruff.lint]
260-
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"]
260+
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"]
261261
ignore = ["UP047", "UP045", "S", "C901", "RUF", "SIM", "B017", "TRY004", "TRY201", "TRY203", "TRY401", "B008", "EXE001", "G201", "ISC004", "PYI034", "PYI064"]
262262

263263
[tool.ruff.lint.flake8-tidy-imports.banned-api]

‎src/utils/token_counter.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def __str__(self) -> str:
3333
"""
3434
return (
3535
f"{self.__class__.__name__}: "
36-
+ f"input_tokens: {self.input_tokens} "
37-
+ f"output_tokens: {self.output_tokens} "
38-
+ f"counted: {self.input_tokens_counted} "
39-
+ f"LLM calls: {self.llm_calls}"
36+
f"input_tokens: {self.input_tokens} "
37+
f"output_tokens: {self.output_tokens} "
38+
f"counted: {self.input_tokens_counted} "
39+
f"LLM calls: {self.llm_calls}"
4040
)

‎tests/unit/models/config/test_cors.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def test_cors_improper_configuration() -> None:
9090
"""
9191
expected = (
9292
"Value error, Invalid CORS configuration: "
93-
+ "allow_credentials can not be set to true when allow origins contains the '\\*' wildcard."
94-
+ "Use explicit origins or disable credentials."
93+
"allow_credentials can not be set to true when allow origins contains the '\\*' wildcard."
94+
"Use explicit origins or disable credentials."
9595
)
9696

9797
with pytest.raises(ValueError, match=expected):

‎tests/unit/utils/test_ogx_version.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def test_check_ogx_version_too_small_version(
6262

6363
expected_exception_msg = (
6464
f"OGX version >= {MINIMAL_SUPPORTED_OGX_VERSION} "
65-
+ "is required, but 0.0.0 is used"
65+
"is required, but 0.0.0 is used"
6666
)
6767
# test if the version is checked
6868
with pytest.raises(InvalidOgxVersionException, match=expected_exception_msg):
@@ -84,7 +84,7 @@ async def _check_version_must_fail(mock_client: Any, bigger_version: Version) ->
8484

8585
expected_exception_msg = (
8686
f"OGX version <= {MAXIMAL_SUPPORTED_OGX_VERSION} is required, "
87-
+ f"but {bigger_version} is used"
87+
f"but {bigger_version} is used"
8888
)
8989
# test if the version is checked
9090
with pytest.raises(InvalidOgxVersionException, match=expected_exception_msg):

0 commit comments

Comments
 (0)