mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 02:42:36 +00:00
fix lint errors
This commit is contained in:
1
cli/pyproject.toml
vendored
1
cli/pyproject.toml
vendored
@@ -77,6 +77,7 @@ ignore = [
|
||||
"PLR2004",
|
||||
"PLR0913",
|
||||
"PLR0915",
|
||||
"PLR0917",
|
||||
"PLC0415",
|
||||
"E402",
|
||||
"E501",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from openbb_core.app.route_iter import iter_api_routes
|
||||
|
||||
from openbb_technical.router import router
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
-------
|
||||
|
||||
@@ -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}]
|
||||
|
||||
@@ -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,
|
||||
|
||||
2
openbb_platform/providers/bls/pyproject.toml
vendored
2
openbb_platform/providers/bls/pyproject.toml
vendored
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
2
openbb_platform/providers/ecb/pyproject.toml
vendored
2
openbb_platform/providers/ecb/pyproject.toml
vendored
@@ -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",
|
||||
|
||||
2
openbb_platform/providers/eia/pyproject.toml
vendored
2
openbb_platform/providers/eia/pyproject.toml
vendored
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
2
openbb_platform/providers/imf/pyproject.toml
vendored
2
openbb_platform/providers/imf/pyproject.toml
vendored
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user