pyproject.toml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. [tool.black]
  10. target_version = ["py310"]
  11. # DEFAULT_EXCLUDES from https://github.com/psf/black/blob/main/src/black/const.py but without "build" directory since we use it in our source code. Instead exclude target and target-xcompile
  12. exclude = "(\\.direnv|\\.eggs|\\.git|\\.hg|\\.ipynb_checkpoints|\\.mypy_cache|\\.nox|\\.pytest_cache|\\.ruff_cache|\\.tox|\\.svn|\\.venv|\\.vscode|__pypackages__|_build|buck-out|dist|venv|target|target-xcompile|\\.terraform|misc/fivetran-sdk)"
  13. [tool.ruff]
  14. target-version = "py310"
  15. select = [
  16. "F",
  17. "I",
  18. "UP", # e.g. PEP585 (Python 3.10+) type annotations
  19. "E711", # comparisons to none
  20. ]
  21. extend-exclude = [
  22. "venv", "target",
  23. # This dbt adapter may be published elsewhere, so doesn't follow the same compatibility rules as our internal code.
  24. "misc/dbt-materialize",
  25. # The fivetran-sdk is a submodule that we don't control.
  26. "misc/fivetran-sdk",
  27. ]
  28. [tool.ruff.isort]
  29. known-first-party = ["materialize"]
  30. [tool.pyright]
  31. # Allow pyright to find imports for python files
  32. # in random folders, e.g. mzcompose.py files
  33. extraPaths = ["misc/python"]
  34. venvPath = "./misc/python"
  35. venv = "venv"
  36. exclude = ["**/venv", "**/.terraform"]
  37. stubPath = "./misc/python/stubs"
  38. reportMissingImports = "warning"
  39. reportMissingModuleSource = "warning"
  40. reportMissingTypeStubs = "warning"
  41. reportOptionalMemberAccess = "warning"
  42. reportUnboundVariable = "warning"
  43. reportPrivateImportUsage = "warning"
  44. reportTypedDictNotRequiredAccess = "none"
  45. reportOptionalSubscript = "warning"
  46. typeCheckingMode = "basic"
  47. ignore = [
  48. # Rust build artifacts are not subject to our static analysis.
  49. "target/",
  50. ]
  51. [tool.pytest.ini_options]
  52. log_cli = true
  53. log_cli_level = "INFO"
  54. # do not include the timestamp which is already provided by Buildkite
  55. log_cli_format = "[%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"