-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merge setup.cfg into pyproject.toml * Use includes instead of excludes for black * Remove pipenv dependency * Keep spellcheck from searching hidden directories. Otherwise spellcheck will search for example in `.venv` for typos in tooling packages. Maybe the search expression should be a positive list. * Remove the last non-english doc and simplify spellcheck search
- Loading branch information
Showing
8 changed files
with
99 additions
and
670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,88 @@ | ||
[project] | ||
name = 'kmk_firmware' | ||
dependencies = [] | ||
version = '0' | ||
requires-python = '>=3.10' | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
'flake8==7.0.0', | ||
'flake8-black', | ||
'flake8-commas', | ||
'flake8-comprehensions', | ||
'flake8-isort', | ||
'flake8-pyproject', | ||
'flake8-quotes', | ||
] | ||
|
||
[tool.setuptools] | ||
packages = [] | ||
|
||
[tool.black] | ||
# since black refuses to allow single-quotes... see locked conversation at | ||
# https://github.com/psf/black/issues/594 | ||
skip-string-normalization = true | ||
# explicitly exclude user_keymaps from black formatting rules | ||
# because a visually-appealing keymap list will be flattened | ||
# by black into a much harder to understand format | ||
target-version = ['py36'] | ||
exclude = ''' | ||
include = ''' | ||
/( | ||
\.git | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| \.pytest_cache | ||
| \.compiled | ||
| dist | ||
| build | ||
| docs | ||
| mnt | ||
)/ | ||
boards | ||
|kmk | ||
|tests | ||
|user_keymaps | ||
)/.*\.py | ||
''' | ||
|
||
[tool.flake8] | ||
filename = [ | ||
'./boards/*.py', | ||
'./kmk/*.py', | ||
'./tests/*.py', | ||
'./user_keymaps/*.py', | ||
] | ||
# match black expectations | ||
max-line-length = 88 | ||
|
||
# enforce single quotes | ||
docstring-quotes = "'''" | ||
multiline-quotes = "'''" | ||
|
||
extend-ignore = [ | ||
# manage trailing commas | ||
'C812', 'C813', | ||
# ignore: comment should start with '# ' | ||
'E262', | ||
# manage line lengths | ||
'E501', | ||
] | ||
|
||
per-file-ignores = [ | ||
# Allow misaligned array entries | ||
'boards/**/*.py: E131', | ||
'user_keymaps/**/*.py: E131', | ||
] | ||
|
||
[tool.isort] | ||
known_standard_library = [ | ||
'analogio', | ||
'bitbangio', | ||
'bleio', | ||
'board', | ||
'busio', | ||
'digitalio', | ||
'framebuf', | ||
'gc', | ||
'machine', | ||
'microcontroller', | ||
'micropython', | ||
'neopixel', | ||
'pulseio', | ||
'supervisor', | ||
'usb_hid' | ||
] | ||
profile = 'black' | ||
skip_glob = [ | ||
'!boards/*.py', | ||
'!kmk/*.py', | ||
'!tests/*.py', | ||
'!user_keymaps/*.py', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters