fix lint errors

This commit is contained in:
deeleeramone
2026-09-24 19:16:58 -07:00
parent b0c092ece5
commit dc71797e06
14 changed files with 16 additions and 13 deletions

1
cli/pyproject.toml vendored
View File

@@ -77,6 +77,7 @@ ignore = [
"PLR2004",
"PLR0913",
"PLR0915",
"PLR0917",
"PLC0415",
"E402",
"E501",

View File

@@ -3,6 +3,7 @@
from __future__ import annotations
from openbb_core.app.route_iter import iter_api_routes
from openbb_technical.router import router

View File

@@ -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
-------

View File

@@ -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}]

View File

@@ -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,

View File

@@ -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",

View File

@@ -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,

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",