autogen

Форк
0
/
pyproject.toml 
96 строк · 2.4 Кб
1
[metadata]
2
license_file = "LICENSE"
3
description-file = "README.md"
4

5

6
[tool.pytest.ini_options]
7
addopts = '--cov=. --cov-append --cov-branch --cov-report=xml -m "not conda"'
8
markers = ["conda: test related to conda forge distribution"]
9

10
[tool.black]
11
# https://github.com/psf/black
12
line-length = 120
13
exclude = "(.eggs|.git|.hg|.mypy_cache|.venv|_build|buck-out|build|dist)"
14

15

16
[tool.ruff]
17
line-length = 120
18

19
[tool.ruff.lint]
20
# Enable Pyflakes `E` and `F` codes by default.
21
select = [
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
]
30
ignore = ["E501", "F401", "F403", "C901"]
31

32
# Exclude a variety of commonly ignored directories.
33
exclude = [
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
]
48
ignore-init-module-imports = true
49
unfixable = ["F401"]
50

51
[tool.ruff.lint.mccabe]
52
# Unlike Flake8, default to a complexity level of 10.
53
max-complexity = 10
54

55
[tool.mypy]
56
files = [
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
]
68
exclude = [
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

76
strict = true
77
python_version = "3.8"
78
ignore_missing_imports = true
79
install_types = true
80
non_interactive = true
81
plugins = ["pydantic.mypy"]
82

83
# remove after all files in the repo are fixed
84
follow_imports = "silent"
85

86
# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
87
disallow_untyped_defs = true
88
no_implicit_optional = true
89
check_untyped_defs = true
90
warn_return_any = true
91
show_error_codes = true
92
warn_unused_ignores = true
93

94
disallow_incomplete_defs = true
95
disallow_untyped_decorators = true
96
disallow_any_unimported = true
97

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.