forked from openai/gym
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit hooks for bandit, black, codespell, and flake8 (openai…
…#2270) * Add pre-commit hooks for bandit, black, codespell, and flake8 * Those pesky - -- characters... * Merge workflows and remove reduddency * Resync
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# https://pre-commit.com | ||
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file. | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- run: pip install pre-commit | ||
- run: pre-commit --version | ||
- run: pre-commit install | ||
- run: pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/bandit/ | ||
rev: 1.7.0 | ||
hooks: | ||
- id: bandit | ||
args: | ||
- --recursive | ||
- --skip | ||
- B101,B108,B301,B403,B404,B603 | ||
- . | ||
- repo: https://github.com/python/black | ||
rev: 21.7b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
args: | ||
- --ignore-words-list=nd,reacher,thist,ths | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
- --ignore=E203,E402,E712,E722,E731,E741,F401,F403,F405,F524,F841,W503 | ||
- --max-complexity=30 | ||
- --max-line-length=456 | ||
- --show-source | ||
- --statistics |