autogen
/
pyproject.toml
96 строк · 2.4 Кб
1[metadata]
2license_file = "LICENSE"
3description-file = "README.md"
4
5
6[tool.pytest.ini_options]
7addopts = '--cov=. --cov-append --cov-branch --cov-report=xml -m "not conda"'
8markers = ["conda: test related to conda forge distribution"]
9
10[tool.black]
11# https://github.com/psf/black
12line-length = 120
13exclude = "(.eggs|.git|.hg|.mypy_cache|.venv|_build|buck-out|build|dist)"
14
15
16[tool.ruff]
17line-length = 120
18
19[tool.ruff.lint]
20# Enable Pyflakes `E` and `F` codes by default.
21select = [
22"E",
23"W", # see: https://pypi.org/project/pycodestyle
24"F", # see: https://pypi.org/project/pyflakes
25# "D", # see: https://pypi.org/project/pydocstyle
26# "N", # see: https://pypi.org/project/pep8-naming
27# "S", # see: https://pypi.org/project/flake8-bandit
28"I", # see: https://pypi.org/project/isort/
29]
30ignore = ["E501", "F401", "F403", "C901"]
31
32# Exclude a variety of commonly ignored directories.
33exclude = [
34".eggs",
35".git",
36".mypy_cache",
37".ruff_cache",
38"__pypackages__",
39"_build",
40"build",
41"dist",
42"docs",
43# This file needs to be either upgraded or removed and therefore should be
44# ignore from type checking for now
45"math_utils\\.py$",
46"**/cap/py/autogencap/proto/*",
47]
48ignore-init-module-imports = true
49unfixable = ["F401"]
50
51[tool.ruff.lint.mccabe]
52# Unlike Flake8, default to a complexity level of 10.
53max-complexity = 10
54
55[tool.mypy]
56files = [
57"autogen/logger",
58"autogen/exception_utils.py",
59"autogen/coding",
60"autogen/oai/openai_utils.py",
61"autogen/_pydantic.py",
62"autogen/function_utils.py",
63"autogen/io",
64"test/test_pydantic.py",
65"test/test_function_utils.py",
66"test/io",
67]
68exclude = [
69"autogen/math_utils\\.py",
70"autogen/oai/completion\\.py",
71"autogen/agentchat/contrib/compressible_agent\\.py",
72"autogen/agentchat/contrib/math_user_proxy_agent.py",
73"autogen/oai/openai_utils.py",
74]
75
76strict = true
77python_version = "3.8"
78ignore_missing_imports = true
79install_types = true
80non_interactive = true
81plugins = ["pydantic.mypy"]
82
83# remove after all files in the repo are fixed
84follow_imports = "silent"
85
86# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
87disallow_untyped_defs = true
88no_implicit_optional = true
89check_untyped_defs = true
90warn_return_any = true
91show_error_codes = true
92warn_unused_ignores = true
93
94disallow_incomplete_defs = true
95disallow_untyped_decorators = true
96disallow_any_unimported = true
97