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