Skip to content

Commit

Permalink
Update black configuration
Browse files Browse the repository at this point in the history
Allow line lengths of 100 for black and remove flake8's config on
length. flake8 is already configured to ignore line length violations.

Reasoning of 100:

A line length of 88 is the default which is 8 more than PEP-8
recommendations. This comes from the default recommendation plus two
indents worth which amount to a class and method. 100 allows for three
more indents. The goal here is not to encourage deeper nesting but to
encourage more verbose naming without trying to trim those few
characteres.

Overall expectation is to keep using a visual guide of 88 characters.
  • Loading branch information
Preocts committed Dec 28, 2024
1 parent d21909e commit db35bd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
extend-ignore =
E501
E203
max-line-length = 88
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ homepage = "https://github.com/[ORG NAME]/[REPO NAME]"
# [project.scripts]
# python-src-example = "module_name.sample:main"

[tool.black]
line-length = 100
target-version = ['py39']

[tool.setuptools.package-data]
"module_name" = ["py.typed"]

Expand Down

0 comments on commit db35bd1

Please sign in to comment.