Skip to content

Commit

Permalink
Merge pull request #38 from hardcoretech/upgrade-pre-commit-dependencies
Browse files Browse the repository at this point in the history
Upgrade pre-commit dependencies
  • Loading branch information
mattwang44 authored May 31, 2023
2 parents 583fa11 + 6936490 commit bddf7fa
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 1024
- uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: 3.11
- name: pre-commit
env:
BASE_SHA: ${{ github.event.pull_request.base.sha}}
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ default_stages: [commit, push]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/myint/autoflake
rev: v1.4
rev: v2.1.1
hooks:
- id: autoflake
args:
Expand All @@ -16,27 +16,27 @@ repos:
- --remove-all-unused-imports
- --ignore-init-module-imports # TODO: remove this
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.3.0
hooks:
- id: black
language_version: python3.6
language_version: python3.11
args:
- --target-version=py36
- --target-version=py311
- --line-length=120
- --skip-string-normalization
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.5.1"
rev: v2.7.1
hooks:
- id: prettier
additional_dependencies:
- prettier@2.2.1
- prettier@2.7.1
exclude: node_modules
types_or: [javascript, ts]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 6.0.0
hooks:
- id: flake8
1 change: 0 additions & 1 deletion data_spec_validator/decorator/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def _is_view(obj):

def _combine_named_params(data, **kwargs):
def combine_params(_data, params):

raise_if(bool(set(_data.keys()) & set(params.keys())), RuntimeError('Data and URL named param have conflict'))

if isinstance(_data, QueryDict):
Expand Down
1 change: 0 additions & 1 deletion data_spec_validator/spec/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def __repr__(self):
def _process_class(
cls: Type, strict: bool, any_keys_set: Union[Set[Tuple[str, ...]], None], err_mode: ErrorMode
) -> Type:

setattr(cls, _FEAT_PARAMS, _DSVFeatureParams(strict, any_keys_set, err_mode))

return cls
Expand Down
9 changes: 6 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[flake8]
extend-ignore=
E203, # See https://github.com/PyCQA/pycodestyle/issues/373
E501, # style related, follow black
W503, # style related, follow black
# See https://github.com/PyCQA/pycodestyle/issues/373
E203,
# style related, follow black
E501,
# style related, follow black
W503,
max-line-length = 120
per-file-ignores =
# imported but unused
Expand Down
1 change: 1 addition & 0 deletions test/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@ def test_optional_conditional_existence_other_check_fail(self):
dict(c=1)
dict(d=1)
"""

# ==========================
class _CondExistOtherFailAOBOCOSpec:
a = Checker([STR, COND_EXIST], optional=True, COND_EXIST=dict(WITHOUT=['c']))
Expand Down

0 comments on commit bddf7fa

Please sign in to comment.