Update Pipfile to add typing module and pyright Update pyproject.toml for pyright and mypy configs
49 lines
1.0 KiB
TOML
49 lines
1.0 KiB
TOML
[tool.black]
|
|
# since black refuses to allow single-quotes... see locked conversation at
|
|
# https://github.com/psf/black/issues/594
|
|
skip-string-normalization = true
|
|
target = "py36"
|
|
# explicitly exculde user_keymaps from black formatting rules
|
|
# because a visually-appealing keymap list will be flattened
|
|
# by black into a much harder to understand format
|
|
exclude = '''
|
|
/(
|
|
\.git
|
|
| \.mypy_cache
|
|
| \.tox
|
|
| \.venv
|
|
| \.pytest_cache
|
|
| \.compiled
|
|
| dist
|
|
| boards
|
|
| build
|
|
| docs
|
|
| user_keymaps
|
|
| mnt
|
|
)/
|
|
'''
|
|
|
|
[tool.pyright]
|
|
strict = ["kmk"]
|
|
typeCheckingMode = "strict"
|
|
include = ["kmk"]
|
|
exclude = [
|
|
"hardware",
|
|
".venv",
|
|
"user_keymaps",
|
|
"boards",
|
|
".git"
|
|
]
|
|
venvPath = ".venv"
|
|
# stops constant reporting of missing board module etc.
|
|
reportMissingModuleSource = false
|
|
# reports missing typestubs allowing for a code action to
|
|
# create new library typestubs
|
|
reportMissingTypeStubs = true
|
|
pythonVersion = "3.6"
|
|
|
|
[tool.mypy]
|
|
exclude = "boards/|user_keymaps/"
|
|
ignore_missing_imports = true
|
|
python_version = "3.6"
|