Skip to content

Commit

Permalink
remove handler
Browse files Browse the repository at this point in the history
  • Loading branch information
shmir committed Feb 3, 2022
1 parent bc4f55c commit 5f05a7f
Show file tree
Hide file tree
Showing 9 changed files with 417 additions and 266 deletions.
53 changes: 53 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
exclude: src/ixia_data_model.py
repos:
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
language_version: python3.7
args: [--line-length=127]
- repo: https://github.com/python/black
rev: 21.12b0
hooks:
- id: black
language_version: python3.7
args: [--line-length=127]
# We can safely ignore flake8 warnings that pylint catches.
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [
flake8-docstrings,
flake8-builtins,
flake8-comprehensions,
flake8-print,
flake8-eradicate,
]
language_version: python3.7
args: [
--max-line-length=127,
'--ignore=A002,A003,D100,D101,D102,D103,D104,D105,D106,D107,D200,D210,D401,E203,W503'
]
# See https://stackoverflow.com/questions/61238318/pylint-and-pre-commit-hook-unable-to-import/61238571#61238571
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args: [
--max-line-length=127,
--max-public-methods=40,
--max-statements=80,
--max-args=8,
'--disable=too-few-public-methods,logging-fstring-interpolation,too-many-instance-attributes,no-else-return,too-many-locals,no-self-use,duplicate-code,broad-except,logging-not-lazy,unspecified-encoding',
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.930
hooks:
- id: mypy
verbose: true
entry: bash -c 'mypy "$@" || true' --
additional_dependencies: [types-PyYAML]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ user=pypiadmin
password=pypiadmin

install:
pip install -i http://$(repo):8036 --trusted-host $(repo) -U --pre --use-feature=2020-resolver -r test_requirements.txt
python -m pip install -U pip==20.2.4
pip install -i http://$(repo):8036 --trusted-host $(repo) -U --pre -r test_requirements.txt

.PHONY: build
build:
Expand Down
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[isort]
profile = black

[mypy]
ignore_missing_imports = True
allow_untyped_calls = False
allow_untyped_defs = False
allow_incomplete_defs = False
follow_imports = skip
Loading

0 comments on commit 5f05a7f

Please sign in to comment.