Files
Claude fa9183413a Fix CI: black formatting, unused imports, ruff E501 per-file ignore
- Run black on all 5 encyclopedia files (reformatted implicit string
  concatenation style)
- Remove unused imports: os, sys, typing.Any, TA_LEFT,
  getSampleStyleSheet, TableOfContents from generate_encyclopedia_pdf.py
  and os from enc_chapters_7_8.py
- Add ruff per-file-ignores for enc_chapters_*.py to suppress E501 on
  intentionally long paragraph text strings (data content, not code)

https://claude.ai/code/session_01XK3QukksvwKVVY4GuHjauJ
2026-05-21 13:36:43 +00:00

85 lines
1.6 KiB
TOML

[tool.black]
line-length = 120
target-version = ['py311', 'py312']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = []
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tools/scripts/enc_chapters_*.py" = ["E501"]
[tool.mypy]
python_version = "3.11"
explicit_package_bases = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
strict_equality = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[tool.coverage.run]
source = ["tools/scripts", "src/sources"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/venv/*",
"*/.venv/*",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.coverage.html]
directory = "coverage_html"
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"