From c6142da0f8a55135cd8710a2a6fc66c04c3c7c9a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 29 Nov 2019 14:55:25 +0100 Subject: [PATCH] add linter config --- .flake8 | 8 ++++++++ gitbatch/__main__.py | 5 +++-- setup.cfg | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .flake8 create mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..8a50104 --- /dev/null +++ b/.flake8 @@ -0,0 +1,8 @@ +[flake8] +# Temp disable Docstring checks D101, D102, D103, D107 +ignore = E501, W503, F401, N813, D101, D102, D103, D107 +max-line-length = 100 +inline-quotes = double +exclude = .git,.tox,__pycache__,build,dist,tests,*.pyc,*.egg-info,.cache,.eggs,env* +application-import-names = ansiblelater +format = ${cyan}%(path)s:%(row)d:%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s diff --git a/gitbatch/__main__.py b/gitbatch/__main__.py index f035dc8..28860db 100644 --- a/gitbatch/__main__.py +++ b/gitbatch/__main__.py @@ -1,13 +1,14 @@ #!/usr/bin/env python3 import argparse -import os import logging +import os import sys +from urllib.parse import urlparse + import git from gitbatch import __version__ -from urllib.parse import urlparse logger = logging.getLogger("gitbatch") formatter = logging.Formatter("[%(levelname)s] %(message)s") diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..33e325f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,20 @@ +[metadata] +description-file = README.md +license_file = LICENSE + +[bdist_wheel] +universal = 1 + +[isort] +default_section = THIRDPARTY +known_first_party = gitbatch +sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER +force_single_line = true +line_length = 120 +skip_glob = **/.venv/* + +[tool:pytest] +filterwarnings = + ignore::FutureWarning + ignore:.*collections.*:DeprecationWarning + ignore:.*pep8.*:FutureWarning