summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormontezdesousa <79287829+montezdesousa@users.noreply.github.com>2024-05-23 13:58:19 +0100
committerGitHub <noreply@github.com>2024-05-23 13:58:19 +0100
commit22034a2b1da605cbe31dfa826e2927261f88d077 (patch)
treecf366a5b577fc05fc5a163da35f0f92cde59f8b8
parent7680b814f003e1de0a6f69341bedf1bd909313d9 (diff)
parent1e46549f00426e8406ae26b0f254b451896a9cf4 (diff)
Merge branch 'develop' into feature/provider-fallbacks
-rw-r--r--.github/workflows/general-linting.yml19
-rw-r--r--.pre-commit-config.yaml2
-rw-r--r--openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py2
3 files changed, 12 insertions, 11 deletions
diff --git a/.github/workflows/general-linting.yml b/.github/workflows/general-linting.yml
index 792886414d6..d6d51d4e1f4 100644
--- a/.github/workflows/general-linting.yml
+++ b/.github/workflows/general-linting.yml
@@ -45,8 +45,8 @@ jobs:
if: github.event_name == 'pull_request'
run: |
# "Checking PR diff"
- echo "platform_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep 'openbb_platform/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
- echo $platform_files
+ echo "diff_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep 'openbb_platform/.*\.py$|cli/.*\.py$' | grep -v 'openbb_platform/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV
+ echo $diff_files
- uses: actions/cache@v3
with:
@@ -58,16 +58,17 @@ jobs:
pip install openbb-devtools
pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
- run: bandit -x ./tests -r . || true
- - run: black --diff --check .
- run: codespell --ignore-words=.codespell.ignore --skip="$(tr '\n' ',' < .codespell.skip | sed 's/,$//')" --quiet-level=2
- - run: ruff .
- run: |
- # Run linters for openbb_platform
- if [ -n "${{ env.platform_files }}" ]; then
- pylint ${{ env.platform_files }}
- pydocstyle ${{ env.platform_files }}
+ # Run linters for openbb_platform | cli
+ if [ -n "${{ env.diff_files }}" ]; then
+ black --diff --check ${{ env.diff_files }}
+ mypy ${{ env.diff_files }} --ignore-missing-imports --scripts-are-modules --check-untyped-defs
+ pydocstyle ${{ env.diff_files }}
+ pylint ${{ env.diff_files }}
+ ruff check ${{ env.diff_files }}
else
- echo "No Python files changed in openbb_platform"
+ echo "No Python files changed in openbb_platform | cli"
fi
markdown-link-check:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index af8134cbce1..0b0a2174e4d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,7 +14,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: "v0.4.4"
+ rev: "v0.4.5"
hooks:
- id: ruff
- repo: https://github.com/pycqa/pydocstyle
diff --git a/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py b/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py
index b04c3db596e..e41a87bb02a 100644
--- a/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py
+++ b/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py
@@ -91,7 +91,7 @@ class OpenBBFigure(go.Figure):
if fig:
self.__dict__ = fig.__dict__
- self._charting_settings: Optional["ChartingSettings"] = kwargs.pop(
+ self._charting_settings: Optional[ChartingSettings] = kwargs.pop(
"charting_settings", None
)
self._has_secondary_y = kwargs.pop("has_secondary_y", False)