Skip to content

Commit

Permalink
Improves the settings/userdata command, and upgrade ruff (#5359)
Browse files Browse the repository at this point in the history
* Began the fax

* Bumped ruff

* Fixed a BUNCH of ruff errors

* Fixed a lot of ruff errors

* Simplify if statements

* Fixed black

* Updated some stuff

* Updated some stuff

* A lot more ruff fixes

* Added a fix

* Added a fix

* Fixed mypy

* Fixed some stuff

* Reverted one thing

* Small fix

* Small fix

* Small fix

* Added fix

* Added fix

* Update requirements
  • Loading branch information
colin99d committed Aug 22, 2023
1 parent 3147577 commit 1ca7fd9
Show file tree
Hide file tree
Showing 127 changed files with 1,851 additions and 1,907 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/branch-name-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
echo "Source-branch=$source_branch" >> $GITHUB_OUTPUT
echo "target-branch=$target_branch" >> $GITHUB_OUTPUT
- name: Show Output result for source-branch and target-branch
run: |
echo "source-branch=${{ steps.branch-name-check.outputs.source-branch }}"
echo "target-branch=${{ steps.branch-name-check.outputs.target-branch }}"
- name: Check branch name for develop PRs
if: ${{ steps.branch-name-check.outputs.target-branch == 'develop' }}
run: |
Expand All @@ -50,4 +50,4 @@ jobs:
else
echo "PR is not from a hotfix or release branch. Pull requests must be from a hotfix or release branch and target the main branch"
exit 1
fi
fi
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: workflow_dispatch
jobs:
publish-image:
runs-on: ubuntu-latest
env:
env:
OPENBBTERMINAL_DOCKER_GITHUB_REPOSITORY: ${{ github.repository }}
OPENBB_LOGGING_APP_NAME: "gst_docker"

Expand Down Expand Up @@ -45,4 +45,4 @@ jobs:
- name: Publishing the latest Docker image
run: |
docker push "${OPENBBTERMINAL_DOCKER_POETRY_IMAGE_LATEST}"
if: startsWith(github.ref, 'refs/heads/main')
if: startsWith(github.ref, 'refs/heads/main')
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
(github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'develop' &&
startsWith(github.head_ref, 'docs/'))
startsWith(github.head_ref, 'docs/'))
with:
github_token: ${{ secrets.DEPLOY_TOKEN }}
publish_dir: ./website/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
restore-keys: ${{ runner.os }}-linting-${{ hashFiles('**/poetry.lock') }}

- run: |
pip install bandit black codespell mypy==1.1.1 pylint==2.17.0 ruff==0.0.256
pip install bandit black codespell mypy==1.5.1 pylint==2.17.0 ruff==0.0.285
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 .
Expand Down Expand Up @@ -74,4 +74,4 @@ jobs:
id: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v2.0.0
with:
exclude_file: json_validate_exclude.txt
exclude_file: json_validate_exclude.txt
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.256"
rev: "v0.0.285"
hooks:
- id: ruff
- repo: https://github.com/codespell-project/codespell
Expand Down
4 changes: 3 additions & 1 deletion generate_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ def build(self) -> None:
f.write(content.replace(b"\r", b"\n"))

# We run black to make sure the code is formatted correctly
subprocess.check_call(["black", "openbb_terminal"]) # nosec: B603, B607
subprocess.check_call( # noqa: S603 # nosec: B603, B607
["black", "openbb_terminal"] # noqa: S603,S607
)


def generate_sdk(sort: bool = False) -> bool:
Expand Down
Loading

0 comments on commit 1ca7fd9

Please sign in to comment.