diff options
author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2022-09-05 01:23:32 +0300 |
---|---|---|
committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2022-10-01 18:12:32 +0300 |
commit | e8bba94ea15c9e81fe5df23ca00547a4c6868e7e (patch) | |
tree | eaeced252d89dfb36414905f66b4eb7c73424a81 | |
parent | bfc04a8534ff233be28b7b4bf70ead8dc95e12c8 (diff) | |
download | pysaml2-e8bba94ea15c9e81fe5df23ca00547a4c6868e7e.tar.gz |
dev: Add black and isort configurations
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
-rw-r--r-- | .editorconfig | 2 | ||||
-rw-r--r-- | pyproject.toml | 37 |
2 files changed, 37 insertions, 2 deletions
diff --git a/.editorconfig b/.editorconfig index e53bec5b..b738a9ea 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ tab_width = 4 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -max_line_length = 88 +max_line_length = 120 [{*.y{a,}ml,*.html,*.xhtml,*.xml,*.xsd}] indent_size = 2 diff --git a/pyproject.toml b/pyproject.toml index 15ffa9de..160cd76b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,7 +123,7 @@ exclude_lines = [ directory = "cov_html" [tool.flake8] -max-line-length = 88 +max-line-length = 120 max-complexity = 18 count = true show-source = true @@ -135,6 +135,7 @@ enable-extensions = [ # 'ignore' defaults to: E121,E123,E126,E226,E24,E704,W503,W504 extend-ignore = [ 'E501', # line too long; instead, use B950 + 'E203', # whitespace before ‘,’, ‘;’, or ‘:’; may conflict with black 'W503', # line break before binary operator ] per-file-ignores = [ @@ -187,6 +188,40 @@ extend-exclude = [ 'build', 'dist', 'sdist', 'wheels', ] +[tool.black] +line-length = 120 +extend-exclude = ''' +# A regex preceded with ^/ will apply only to files and directories +# in the root of the project. +( + \.pytest_cache +) +''' + +[tool.isort] +profile = 'black' +# The 'black' profile means: +# multi_line_output = 3 +# include_trailing_comma = true +# force_grid_wrap = 0 +# use_parentheses = true +# ensure_newline_before_comments = true +# line_length = 88 +line_length = 120 # override black provile line_length +force_single_line = true # override black profile multi_line_output +star_first = true +group_by_package = true +force_sort_within_sections = true +lines_after_imports = 2 +honor_noqa = true +atomic = true +ignore_comments = true +skip_gitignore = true +src_paths = [ + 'src', + 'test', +] + # XXX TODO #[tool.mypy] #pretty = true |