Files
autogen/pyproject.toml
Rajan db30ec8961 Reduce sleep() in CAP library code (#2189)
* 1) Removed most framework sleeps 2) refactored connection code

* pre-commit fixes

* pre-commit

* ignore protobuf files in pre-commit checks

* Fix duplicate actor registration

* refactor change

* Nicer printing of Actors

* 1) Report recv_multipart errors 4) Always send 4 parts

* AutoGen generate_reply expects to wait indefinitely for an answer.  CAP can wait a certain amount and give up.   In order to reconcile the two, AutoGenConnector is set to wait indefinitely.

* pre-commit formatting fixes

* pre-commit format changes

* don't check autogenerated proto py files
2024-04-02 07:49:07 +00:00

107 lines
2.3 KiB
TOML

[metadata]
license_file = "LICENSE"
description-file = "README.md"
[tool.pytest.ini_options]
addopts = '-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
]
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/*",
]
ignore-init-module-imports = true
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",
"test/io",
]
exclude = [
"autogen/math_utils\\.py",
"autogen/oai/completion\\.py",
"autogen/agentchat/contrib/compressible_agent\\.py",
"autogen/agentchat/contrib/math_user_proxy_agent.py",
]
strict = true
python_version = "3.8"
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 = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = true