Skip to content

Commit

Permalink
Merge pull request #302 from WilliamJamieson/testing/update_pre-commit
Browse files Browse the repository at this point in the history
Update toolchains
  • Loading branch information
eslavich committed Feb 23, 2022
2 parents 4cfce18 + 5e5fe19 commit aa4a472
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
16 changes: 6 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,24 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
exclude: "reference_files"

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
exclude: "reference_files"

- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
args: ["--count", "--ignore", "E501, E203, W503"]
exclude: "reference_files"

- repo: https://github.com/PyCQA/bandit
rev: 1.7.2
hooks:
- id: bandit
args: ["--skip", "B101,B404,B603"]
args: ["-c", "bandit.yaml"]
13 changes: 13 additions & 0 deletions bandit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
skips: [ B101, B404, B603 ]

exclude_dirs:
- .eggs
- .git
- .pytest_cache
- .tox
- reference_files
- tests
- build
- dist
- docs
- __pycache__
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,21 @@ write_to = "src/asdf_standard/_version.py"

[tool.black]
line-length = 120
force-exclude = '''
^/(
(
\.eggs
| \.git
| \.pytest_cache
| \.tox
| reference_files
| build
| dist
)/
)
'''

[tool.isort]
profile = "black"
filter_files = true
line_length = 120
7 changes: 1 addition & 6 deletions tests/test_yaml_schema.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import pytest
from common import (
YAML_SCHEMA_PATH,
assert_yaml_header_and_footer,
list_schema_paths,
load_yaml,
)
from common import YAML_SCHEMA_PATH, assert_yaml_header_and_footer, list_schema_paths, load_yaml
from jsonschema import ValidationError


Expand Down

0 comments on commit aa4a472

Please sign in to comment.