Skip to content

Commit

Permalink
GH-93: change formatter (#94)
Browse files Browse the repository at this point in the history
* Change formatter from yapf to black

Yapf is uncommon formatter,
requiring it makes process of onboarding new contributors harder.

Yapf with non-standard configuration as well introduces less common coding style,
which might slightly confuse some developers.

Black with standard configuration is the most popular formatting tool.

* Replace yapf with black in dependencies

Remove plugins
Update poetry.lock
  • Loading branch information
Privat33r-dev authored May 3, 2024
1 parent 5b63051 commit c1cf195
Show file tree
Hide file tree
Showing 21 changed files with 1,652 additions and 1,918 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ jobs:
run: |
source .venv/bin/activate
isort -m 9 --line-length 160 $MODULE_NAME tests --check-only
pylint --load-plugins pylint_quotes $MODULE_NAME tests
pylint $MODULE_NAME tests
docformatter --wrap-summaries 160 --wrap-descriptions 160 -cr $MODULE_NAME tests
yapf -rd $MODULE_NAME tests
black --check $MODULE_NAME tests
mypy -V
mypy $MODULE_NAME tests
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ downloads/
eggs/
.eggs/
lib/
Lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -129,4 +130,4 @@ dmypy.json
.pyre/

# IDE files
.idea
.idea
7 changes: 0 additions & 7 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[MASTER]
# init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc())); import pylint_venv; pylint_venv.inithook('./.venv')"
load-plugins=pylint_absolute_imports, pylint_quotes
ignore=.venv,setup.py

[DESIGN]
Expand All @@ -26,11 +24,6 @@ max-locals=20
# Make docstring compulsory for all functions
no-docstring-rgx=$^

# MODULE-PARAM: pylint-quotes
string-quote=single
triple-quote=double
docstring-quote=double

[ELIF]

# Maximum number of nested blocks for function/method body
Expand Down
Loading

0 comments on commit c1cf195

Please sign in to comment.