Files
discord_bot/pyproject.toml
T
2026-07-13 12:51:53 +02:00

139 lines
2.9 KiB
TOML

[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "fjerkroa-bot"
version = "2.0"
description = "Discord bot with OpenAI responder for Fjærkroa and GGG"
authors = [{ name = "Oleksandr Kozachuk", email = "ddeus.lp@mailnull.com" }]
requires-python = ">=3.11"
dependencies = [
"discord.py>=2.5,<3",
"openai>=2.45", # 2.x since the FDB-005 envelope rewrite (D-007)
"aiohttp>=3.12",
"tomlkit>=0.13",
"watchdog>=6",
"requests>=2.32",
]
[project.scripts]
fjerkroa_bot = "fjerkroa_bot:main"
[dependency-groups]
dev = [
"pytest>=8",
"pytest-asyncio>=1",
"pytest-bdd>=8",
"pytest-cov>=6",
"respx>=0.22",
"toml>=0.10",
"mypy>=1.16",
"flake8>=7",
"black>=25",
"isort>=6",
"bandit[toml]>=1.8",
"pre-commit>=4",
"pip-audit>=2.9",
"types-requests",
"types-toml",
]
[tool.setuptools]
packages = ["fjerkroa_bot"]
[tool.mypy]
files = ["fjerkroa_bot", "tests"]
python_version = "3.11"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"discord.*",
"aiohttp.*",
"openai.*",
"tomlkit.*",
"watchdog.*",
"setuptools.*"
]
ignore_missing_imports = true
[tool.black]
line-length = 140
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 140
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
known_first_party = ["fjerkroa_bot"]
[tool.bandit]
exclude_dirs = ["tests", ".venv", "venv"]
skips = ["B101", "B601", "B301", "B311", "B403", "B113"] # Skip pickle, random, and request timeout warnings for this application
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --strict-markers --strict-config -W ignore::DeprecationWarning"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
]
[tool.coverage.run]
source = ["fjerkroa_bot"]
omit = [
"*/tests/*",
"*/test_*",
]
[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__.:",
"class .*\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]