Loading .editorconfig 0 → 100644 +13 −0 Original line number Diff line number Diff line root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = tab [*.{yml,yaml}] indent_style = space indent_size = 2 # vim:ft=cfg .gitlint 0 → 100644 +7 −0 Original line number Diff line number Diff line [general] ignore=body-trailing-whitespace,body-is-missing [author-valid-email] regex=.*@[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](\.[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9])+ # vim:ft=cfg .lint 0 → 100644 +95 −0 Original line number Diff line number Diff line [flake8] max-line-length = 92 max-doc-length = 92 copyright-check = true copyright-min-file-size = 200 use-flake8-tabs = true blank-lines-indent = never indent-tabs-def = 1 format = pylint select = C,D,E,ET,F,SFS,T,W,WT ; Speedup by pruning potentially large trees that will have nothing of interest ; in them. exclude = __pycache__ .* per-file-ignores = setup.py: D100, E702 tests/*.py: D100, C801 **/__init__.py: D104 **/__main__.py: D100, E702 ignore = ;[ Missing docstring in public method ] ; Handled by pylint, which does it better D102 ;[ Missing docstring in magic method ] ; Magic/dunder methods are well-known D105 ;[ Misisng docstring in __init__ ] ; Document basic construction in the class docstring D107 ;[ One-line docstring should fit on one line with quotes ] ; Prefer top-and-bottom style always D200 ;[ Docstring should be indented with spaces, not tabs ] ; Tabs, absolutely always D206 ;[ Use r""" if any backslashes in a docstring ] ; If I want to put escape chars in a docstring, I will D301 ;[ Use u""" for Unicode docstrings ] ; This must be for Python 2? D302 ;[ First line should end with a period ] ; First line should *NEVER* end with a period D400 ;[ First line should be in the imperative mood ] ; I like this for functions and methods, not for properties. This stands until ; pydocstyle splits a new code for properties or flake8 adds some way of ; filtering codes with line regexes like golangci-lint. D401 ;[ No blank lines allowed between a section header and its content ] D412 ;[ Line too long ] ; Prefer B950 implementation E501 ;[ '%s' imported but unused ] ; Prefer pylint F401 ;[ Line break before binary operator ] ; Not considered current W503 ;[ Format-method string formatting ] ; Allow this style SFS201 ;[ f-string string formatting ] ; Allow this style SFS301 include = ;[ First word of the docstring should not be This ] D404 ; flake8-bugbear plugin ; B950 is a replacement for E501 B0 B903 B950 ; vim:ft=cfg:sw=2:sts=2:expandtab .pre-commit-config.yaml 0 → 100644 +57 −0 Original line number Diff line number Diff line repos: - repo: meta hooks: - id: check-hooks-apply - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: - id: check-added-large-files - id: check-byte-order-marker - id: check-case-conflict - id: check-merge-conflict - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/jorisroovers/gitlint rev: v0.13.1 hooks: - id: gitlint - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.5.1 hooks: - id: python-no-eval - id: python-no-log-warn - id: python-use-type-annotations - repo: https://github.com/hakancelik96/unimport rev: 0.2.7 hooks: - id: unimport args: [--remove, --exclude=types.py|__init__.py] - repo: https://github.com/timothycrosley/isort rev: 4.3.21-2 hooks: - id: isort types: [python] - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.3 hooks: - id: flake8 args: ["--config=.lint"] additional_dependencies: - flake8-commas - flake8-copyright - flake8-bugbear - flake8-docstrings - flake8-print - flake8-requirements - flake8-return - flake8-sfs - flake8-tabs pyproject.toml +3 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,6 @@ classifiers = [ [tool.flit.scripts] pre-commit-pylint = "pre_commit_pylint:main" [tool.isort] force_single_line = true Loading
.editorconfig 0 → 100644 +13 −0 Original line number Diff line number Diff line root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = tab [*.{yml,yaml}] indent_style = space indent_size = 2 # vim:ft=cfg
.gitlint 0 → 100644 +7 −0 Original line number Diff line number Diff line [general] ignore=body-trailing-whitespace,body-is-missing [author-valid-email] regex=.*@[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](\.[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9])+ # vim:ft=cfg
.lint 0 → 100644 +95 −0 Original line number Diff line number Diff line [flake8] max-line-length = 92 max-doc-length = 92 copyright-check = true copyright-min-file-size = 200 use-flake8-tabs = true blank-lines-indent = never indent-tabs-def = 1 format = pylint select = C,D,E,ET,F,SFS,T,W,WT ; Speedup by pruning potentially large trees that will have nothing of interest ; in them. exclude = __pycache__ .* per-file-ignores = setup.py: D100, E702 tests/*.py: D100, C801 **/__init__.py: D104 **/__main__.py: D100, E702 ignore = ;[ Missing docstring in public method ] ; Handled by pylint, which does it better D102 ;[ Missing docstring in magic method ] ; Magic/dunder methods are well-known D105 ;[ Misisng docstring in __init__ ] ; Document basic construction in the class docstring D107 ;[ One-line docstring should fit on one line with quotes ] ; Prefer top-and-bottom style always D200 ;[ Docstring should be indented with spaces, not tabs ] ; Tabs, absolutely always D206 ;[ Use r""" if any backslashes in a docstring ] ; If I want to put escape chars in a docstring, I will D301 ;[ Use u""" for Unicode docstrings ] ; This must be for Python 2? D302 ;[ First line should end with a period ] ; First line should *NEVER* end with a period D400 ;[ First line should be in the imperative mood ] ; I like this for functions and methods, not for properties. This stands until ; pydocstyle splits a new code for properties or flake8 adds some way of ; filtering codes with line regexes like golangci-lint. D401 ;[ No blank lines allowed between a section header and its content ] D412 ;[ Line too long ] ; Prefer B950 implementation E501 ;[ '%s' imported but unused ] ; Prefer pylint F401 ;[ Line break before binary operator ] ; Not considered current W503 ;[ Format-method string formatting ] ; Allow this style SFS201 ;[ f-string string formatting ] ; Allow this style SFS301 include = ;[ First word of the docstring should not be This ] D404 ; flake8-bugbear plugin ; B950 is a replacement for E501 B0 B903 B950 ; vim:ft=cfg:sw=2:sts=2:expandtab
.pre-commit-config.yaml 0 → 100644 +57 −0 Original line number Diff line number Diff line repos: - repo: meta hooks: - id: check-hooks-apply - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: - id: check-added-large-files - id: check-byte-order-marker - id: check-case-conflict - id: check-merge-conflict - id: check-yaml - id: debug-statements - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/jorisroovers/gitlint rev: v0.13.1 hooks: - id: gitlint - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.5.1 hooks: - id: python-no-eval - id: python-no-log-warn - id: python-use-type-annotations - repo: https://github.com/hakancelik96/unimport rev: 0.2.7 hooks: - id: unimport args: [--remove, --exclude=types.py|__init__.py] - repo: https://github.com/timothycrosley/isort rev: 4.3.21-2 hooks: - id: isort types: [python] - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.3 hooks: - id: flake8 args: ["--config=.lint"] additional_dependencies: - flake8-commas - flake8-copyright - flake8-bugbear - flake8-docstrings - flake8-print - flake8-requirements - flake8-return - flake8-sfs - flake8-tabs
pyproject.toml +3 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,6 @@ classifiers = [ [tool.flit.scripts] pre-commit-pylint = "pre_commit_pylint:main" [tool.isort] force_single_line = true