pyproject.tomlโข2.1 kB
# Python Linting and Code Quality Configuration
# Note: Flake8 configuration is in setup.cfg or .flake8 file, not in pyproject.toml
# Black configuration
[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
extend-exclude = '''
/(
  # directories
  \.eggs
  | \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | build
  | dist
)/
'''
# isort configuration
[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
# Pylint configuration
[tool.pylint.messages_control]
disable = [
    "C0114",  # missing-module-docstring
    "C0115",  # missing-class-docstring
    "C0116",  # missing-function-docstring
    "R0903",  # too-few-public-methods
    "R0913",  # too-many-arguments
    "W0613",  # unused-argument
    "W0622",  # redefined-builtin
]
[tool.pylint.format]
max-line-length = 100
# MyPy configuration
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
    "pytest",
    "pytest_asyncio",
    "aiohttp",
    "aiofiles",
    "openai",
    "anthropic",
    "transformers",
    "torch",
    "psutil"
]
ignore_missing_imports = true
# Bandit security configuration
[tool.bandit]
exclude_dirs = ["tests", "test_*.py"]
skips = ["B101", "B601"]
# Coverage configuration
[tool.coverage.run]
source = ["."]
omit = [
    "tests/*",
    "test_*.py",
    "venv/*",
    ".venv/*",
    "setup.py",
    "*/__pycache__/*"
]
[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "if self.debug:",
    "if settings.DEBUG",
    "raise AssertionError",
    "raise NotImplementedError",
    "if 0:",
    "if __name__ == .__main__.:"
]