diff --git a/cli/pyproject.toml b/cli/pyproject.toml index ad53687083e..4cb265fa5a3 100644 --- a/cli/pyproject.toml +++ b/cli/pyproject.toml @@ -77,6 +77,7 @@ ignore = [ "PLR2004", "PLR0913", "PLR0915", + "PLR0917", "PLC0415", "E402", "E501", diff --git a/openbb_platform/extensions/technical/tests/test_router.py b/openbb_platform/extensions/technical/tests/test_router.py index ff1f6fc2269..c440b236c07 100644 --- a/openbb_platform/extensions/technical/tests/test_router.py +++ b/openbb_platform/extensions/technical/tests/test_router.py @@ -3,6 +3,7 @@ from __future__ import annotations from openbb_core.app.route_iter import iter_api_routes + from openbb_technical.router import router diff --git a/openbb_platform/extensions/tests/utils/helpers.py b/openbb_platform/extensions/tests/utils/helpers.py index 4760ab3db87..b4239dd1bcf 100644 --- a/openbb_platform/extensions/tests/utils/helpers.py +++ b/openbb_platform/extensions/tests/utils/helpers.py @@ -69,13 +69,14 @@ def check_docstring_examples() -> list[str]: def filter_eps(eps: EntryPoints | dict, group: str) -> tuple[EntryPoint, ...]: + """Return the entry points registered under ``group``.""" if version_info[:2] == (3, 12): return eps.select(group=group) or () # type: ignore[union-attr] return eps.get(group, ()) # type: ignore[union-attr] def list_openbb_extensions() -> tuple[set[str], set[str], set[str]]: - """list installed openbb extensions and providers. + """List installed openbb extensions and providers. Returns ------- diff --git a/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py b/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py index 8361e62a7d3..684fd9b20ab 100644 --- a/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py +++ b/openbb_platform/extensions/tests/utils/integration_tests_api_generator.py @@ -1,9 +1,9 @@ """Generate API integration tests.""" import argparse +import inspect as _inspect import os from pathlib import Path -import inspect as _inspect from typing import Literal import pytest @@ -138,7 +138,7 @@ def write_commands_integration_tests( commands_not_found.append(route) else: sig = _inspect.signature(cm_map[route]) - param_names = [k for k in sig.parameters.keys() if k not in ("cc", "return")] + param_names = [k for k in sig.parameters if k not in ("cc", "return")] params_list = ( [{k: "" for k in param_names}] diff --git a/openbb_platform/extensions/tests/utils/integration_tests_generator.py b/openbb_platform/extensions/tests/utils/integration_tests_generator.py index 8c49d28b00a..d1698c368f9 100644 --- a/openbb_platform/extensions/tests/utils/integration_tests_generator.py +++ b/openbb_platform/extensions/tests/utils/integration_tests_generator.py @@ -1,8 +1,8 @@ """Integration test generator.""" import argparse -from pathlib import Path, PosixPath import inspect as _inspect +from pathlib import Path, PosixPath from typing import ( Any, Literal, diff --git a/openbb_platform/providers/bls/pyproject.toml b/openbb_platform/providers/bls/pyproject.toml index 850d4073e3b..802721868b9 100644 --- a/openbb_platform/providers/bls/pyproject.toml +++ b/openbb_platform/providers/bls/pyproject.toml @@ -62,7 +62,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/ecb/openbb_ecb/utils/generate_cache.py b/openbb_platform/providers/ecb/openbb_ecb/utils/generate_cache.py index 188e9578acd..702d1e16244 100644 --- a/openbb_platform/providers/ecb/openbb_ecb/utils/generate_cache.py +++ b/openbb_platform/providers/ecb/openbb_ecb/utils/generate_cache.py @@ -663,7 +663,7 @@ def _derive_table_context( non_row = [d for d in dims_order if d not in row_dims] pools = { - d: sorted({r.get(d) for r in records if r.get(d) is not None}) for d in non_row + d: sorted({v for r in records if (v := r.get(d)) is not None}) for d in non_row } seed = max( records, diff --git a/openbb_platform/providers/ecb/pyproject.toml b/openbb_platform/providers/ecb/pyproject.toml index 9ff13cea405..a16f4cb09e3 100644 --- a/openbb_platform/providers/ecb/pyproject.toml +++ b/openbb_platform/providers/ecb/pyproject.toml @@ -65,7 +65,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/eia/pyproject.toml b/openbb_platform/providers/eia/pyproject.toml index 75ff2573c2a..9bb9b275cc1 100644 --- a/openbb_platform/providers/eia/pyproject.toml +++ b/openbb_platform/providers/eia/pyproject.toml @@ -64,7 +64,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/famafrench/pyproject.toml b/openbb_platform/providers/famafrench/pyproject.toml index 192412bca9b..91235f7de85 100644 --- a/openbb_platform/providers/famafrench/pyproject.toml +++ b/openbb_platform/providers/famafrench/pyproject.toml @@ -42,7 +42,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/federal_reserve/pyproject.toml b/openbb_platform/providers/federal_reserve/pyproject.toml index bebd7b4cdf1..019c8632be9 100644 --- a/openbb_platform/providers/federal_reserve/pyproject.toml +++ b/openbb_platform/providers/federal_reserve/pyproject.toml @@ -59,7 +59,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/government_us/pyproject.toml b/openbb_platform/providers/government_us/pyproject.toml index 12f150e818f..698225ba6c2 100644 --- a/openbb_platform/providers/government_us/pyproject.toml +++ b/openbb_platform/providers/government_us/pyproject.toml @@ -79,7 +79,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/imf/pyproject.toml b/openbb_platform/providers/imf/pyproject.toml index 3411ff04894..514050c18e5 100644 --- a/openbb_platform/providers/imf/pyproject.toml +++ b/openbb_platform/providers/imf/pyproject.toml @@ -69,7 +69,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408", diff --git a/openbb_platform/providers/jodi/pyproject.toml b/openbb_platform/providers/jodi/pyproject.toml index 4b86878ffbc..6ee467a55df 100644 --- a/openbb_platform/providers/jodi/pyproject.toml +++ b/openbb_platform/providers/jodi/pyproject.toml @@ -43,7 +43,7 @@ fix = true [tool.ruff.lint] select = ["D", "E", "W", "F", "S", "UP", "I", "PLC", "PLE", "PLR", "PLW", "SIM", "T20"] ignore = [ - "PLR2004", "PLR0913", "PLR0915", "PLC0415", + "PLR2004", "PLR0913", "PLR0915", "PLR0917", "PLC0415", "E402", "E501", "D202", "D203", "D205", "D206", "D210", "D212", "D213", "D214", "D215", "D300", "D400", "D404", "D405", "D406", "D407", "D408",