Skip to content

Commit

Permalink
Update pre-commit hooks. (#188)
Browse files Browse the repository at this point in the history
* Update pre-commit hooks.

Results of running `pre-commit autoupdate`, and fixing resulting lint errors. Also make sure all hooks execute with python 3.

* Make linter happy
  • Loading branch information
tobli authored and achantavy committed Dec 5, 2019
1 parent 11103f7 commit aafda82
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
17 changes: 10 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
rev: v2.3.0
hooks:
- id: check-docstring-first
- id: check-executables-have-shebangs
Expand All @@ -11,32 +14,32 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
rev: 3.7.8
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.3
rev: v1.4.4
hooks:
- id: autopep8
# disable a few rewrites which will cause autopep8 to reflow
args: [--in-place, '--ignore=E265,E501,W504']
- repo: https://github.com/asottile/pyupgrade
rev: v1.14.0
rev: v1.25.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v1.0.0
rev: v1.4.1
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.4.0
rev: v1.7.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.700
rev: v0.740
hooks:
- id: mypy
- repo: https://github.com/thlorenz/doctoc
Expand Down
1 change: 0 additions & 1 deletion cartography/driftdetect/reporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

def report_drift_new(results, state_properties):
"""
Prints new additions in Query Results between two states.
Expand Down
1 change: 0 additions & 1 deletion tests/data/okta/adminroles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

LIST_ASSIGNED_USER_ROLE_RESPONSE = """
[
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cartography/intel/gsuite/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_sync_gsuite_groups(all_groups, load_gsuite_groups, cleanup_gsuite_group
}
api.sync_gsuite_groups(session, admin_client, gsuite_update_tag, common_job_param)
groups = api.transform_groups(all_groups())
load_gsuite_groups.assert_called_with(session, groups, gsuite_update_tag,)
load_gsuite_groups.assert_called_with(session, groups, gsuite_update_tag)
cleanup_gsuite_groups.assert_called_once()
sync_gsuite_members.assert_called_with(groups, session, admin_client, gsuite_update_tag)

Expand Down

0 comments on commit aafda82

Please sign in to comment.