Created
February 15, 2024 14:01
-
-
Save christian-ehrisman/26f1d6748b9517cf6685ce804bd0a90b to your computer and use it in GitHub Desktop.
Python
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
[tool.black] | |
target-version = ['py312'] | |
line-length = 88 | |
force-exclude = ''' | |
/( | |
| docs | |
| setup.py | |
)/ | |
''' | |
[tool.isort] | |
py_version = 312 | |
sections = [ | |
"FUTURE", | |
"STDLIB", | |
"THIRDPARTY", | |
"FIRSTPARTY", | |
"LOCALFOLDER" | |
] | |
default_section = "THIRDPARTY" | |
known_third_party = [] | |
known_first_party = [] | |
known_local_folder = [] | |
# style: black | |
multi_line_output = 3 | |
include_trailing_comma = true | |
force_grid_wrap = 0 | |
use_parentheses = true | |
ensure_newline_before_comments = true | |
line_length = 88 | |
split_on_trailing_comma = true | |
lines_after_imports = 2 | |
force_single_line = true | |
skip_glob = [ | |
"docs/*", | |
"setup.py" | |
] | |
filter_files = true | |
[tool.ruff] | |
target-version = "py312" | |
select = ["F", "E"] | |
extend-select = ["W", "C90", "I", "N", "ANN", "B", "A", "C4", "PERF", "RUF"] | |
ignore = ["I001", "N999", "ANN101", "ANN401", "B905", "PERF203","E111"] | |
fixable = ["W", "C90", "I", "N", "ANN", "B", "A", "C4", "PERF", "RUF"] | |
unfixable = [] | |
line-length = 88 | |
indent-width = 4 | |
extend-exclude = ["docs", "test", "tests"] | |
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | |
preview = true | |
[tool.ruff.isort] | |
force-single-line = true | |
force-sort-within-sections = false | |
lines-after-imports = 2 | |
known-first-party = [] | |
known-local-folder = [] | |
known-third-party = [] | |
section-order = [ | |
"future", | |
"standard-library", | |
"third-party", | |
"first-party", | |
"local-folder" | |
] | |
[tool.ruff.mccabe] | |
max-complexity = 24 | |
[tool.ruff.pycodestyle] | |
ignore-overlong-task-comments = true | |
[tool.ruff.pydocstyle] | |
convention = "numpy" | |
[tool.ruff.flake8-annotations] | |
allow-star-arg-any = true | |
ignore-fully-untyped = true | |
[tool.ruff.format] | |
quote-style = "double" | |
indent-style = "space" | |
skip-magic-trailing-comma = false | |
line-ending = "auto" | |
preview = true | |
docstring-code-format = true | |
[tool.mypy] | |
# Platform configuration | |
python_version = "3.12" | |
# imports related | |
ignore_missing_imports = true | |
follow_imports = "silent" | |
# None and Optional handling | |
no_implicit_optional = false | |
strict_optional = false | |
# Configuring warnings | |
warn_unused_configs = true | |
warn_redundant_casts = true | |
warn_unused_ignores = true | |
warn_no_return = true | |
warn_unreachable = true | |
warn_return_any = false | |
# Untyped definitions and calls | |
check_untyped_defs = false | |
disallow_untyped_calls = false | |
disallow_untyped_defs = false | |
disallow_incomplete_defs = false | |
disallow_untyped_decorators = false | |
# Disallow dynamic typing | |
disallow_subclassing_any = false | |
disallow_any_unimported = false | |
disallow_any_expr = false | |
disallow_any_decorated = false | |
disallow_any_explicit = false | |
disallow_any_generics = false | |
# Miscellaneous strictness flags | |
allow_untyped_globals = true | |
allow_redefinition = true | |
local_partial_types = false | |
implicit_reexport = true | |
strict_equality = true | |
# Configuring error messages | |
show_error_context = false | |
show_column_numbers = false | |
show_error_codes = true | |
exclude = ["docs", "test", "tests"] | |
[tool.pyright] | |
pythonVersion = "3.12" | |
typeCheckingMode = "basic" | |
# enable subset of "strict" | |
reportDuplicateImport = true | |
reportInvalidStubStatement = true | |
reportOverlappingOverload = true | |
reportPropertyTypeMismatch = true | |
reportUntypedClassDecorator = false | |
reportUntypedFunctionDecorator = false | |
reportUntypedNamedTuple = false | |
reportUnusedImport = true | |
# disable subset of "basic" | |
reportGeneralTypeIssues = false | |
reportMissingModuleSource = false | |
reportOptionalCall = false | |
reportOptionalIterable = false | |
reportOptionalMemberAccess = false | |
reportOptionalOperand = false | |
reportOptionalSubscript = false | |
reportPrivateImportUsage = false | |
reportUnboundVariable = false | |
exclude = ["docs", "setup.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment