Commit a9412f34 by Jörg Stucke

updated dev and pre-commit dependencies

parent ddb19e5e
[flake8]
extend-ignore = E501,W503
extend-select = E504
exclude =
.git,
__pycache__,
src/bin,
src/install/compose-env
per-file-ignores =
src/plugins/*: E402
src/install/install.py: E402
...@@ -2,7 +2,7 @@ default_stages: [commit, push] ...@@ -2,7 +2,7 @@ default_stages: [commit, push]
exclude: ^src/bin/ exclude: ^src/bin/
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0 rev: v4.0.1
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
args: [--maxkb=10000] args: [--maxkb=10000]
...@@ -13,6 +13,8 @@ repos: ...@@ -13,6 +13,8 @@ repos:
- id: check-yaml - id: check-yaml
- id: double-quote-string-fixer
- id: end-of-file-fixer - id: end-of-file-fixer
types: [python] types: [python]
...@@ -22,9 +24,6 @@ repos: ...@@ -22,9 +24,6 @@ repos:
- id: file-contents-sorter - id: file-contents-sorter
files: src/unpacker/passwords|.gitignore|_list.txt files: src/unpacker/passwords|.gitignore|_list.txt
- id: flake8
args: [--ignore=E501]
- id: forbid-new-submodules - id: forbid-new-submodules
- id: no-commit-to-branch - id: no-commit-to-branch
...@@ -35,16 +34,20 @@ repos: ...@@ -35,16 +34,20 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
types: [python] types: [python]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-pylint - repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.2.2 rev: v3.0.0a4
hooks: hooks:
- id: pylint - id: pylint
language: system language: system
args: [--rcfile=.pylintrc] args: [--rcfile=pyproject.toml]
- repo: https://github.com/jumanjihouse/pre-commit-hooks - repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 1.11.0 rev: 2.1.5
hooks: hooks:
- id: shellcheck - id: shellcheck
...@@ -52,3 +55,18 @@ repos: ...@@ -52,3 +55,18 @@ repos:
rev: v0.1.0 rev: v0.1.0
hooks: hooks:
- id: dockerfilelint - id: dockerfilelint
- repo: https://github.com/pre-commit/mirrors-jshint
rev: v2.13.0
hooks:
- id: jshint
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
[tool.black]
line-length = 120
skip-string-normalization = true
target-version = ['py37']
[tool.pylint.main]
init-hook = 'import sys; sys.path.append("./src")'
ignore-paths = ["src/bin"]
load-plugins = ["pylint.extensions.bad_builtin", "pylint.extensions.mccabe"]
extension-pkg-allow-list = ["yara"]
jobs = 0
include-naming-hint = true
good-names = ["i", "j", "k", "Run", "_", "db", "ex", "fd", "fo", "fp", "fw", "pw", "rv", "sc", "tc"]
[tool.pylint."messages control"]
confidence = []
disable = ["missing-docstring" , "locally-disabled", "logging-format-interpolation", "logging-fstring-interpolation"]
[tool.pylint.reports]
output-format = "colorized"
msg-template="{path}:{line}: [{symbol}:{obj}] {msg}"
[tool.pylint.format]
max-line-length = 120
[tool.pylint.design]
max-args=7
max-complexity = 7
min-public-methods = 0
max-public-methods = 40
[tool.pylint.imports]
known-third-party = ["enchant", "docker"]
[tool.isort]
line_length=120
default_section = "THIRDPARTY"
known_first_party = ["analysis", "compare", "helperFunctions", "install", "intercom", "objects", "plugins", "scheduler",
"statistic", "storage", "test", "unpacker", "version", "web_interface"]
known_third_party = "docker"
profile = "black"
[pytest] [pytest]
addopts = --flake8 -v addopts = -v
flake8-ignore =
*.py E501
pre-commit
pylint
pytest pytest
pytest-cov pytest-cov
pytest-flake8
from pathlib import Path from pathlib import Path
from fact_helper_file.type import get_file_type_from_path, get_file_type_from_binary from fact_helper_file.type import get_file_type_from_binary, get_file_type_from_path
def test_get_file_type_system_magic(): def test_get_file_type_system_magic():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment