Review blocker A — form error swap and false success: - Change HTMX contract so forms target their own container (outerHTML) instead of appending to #comments-list - Use OOB swaps to append approved comments to the correct target - Add success/error message display inside form templates - Remove hx-on::after-request handlers (no longer needed) Review blocker B — reply rendering shape: - Create _reply.html partial with compact reply markup - Approved replies via HTMX now use compact template + OOB swap into parent's .replies-container - Reply form errors render inside reply form container E2E test fixes: - Update 4 failing tests to wait for inline HTMX messages instead of redirect-based URL assertions - Add aria-label='Comment form errors' to form error display - Rename test_reply_submission_redirects to test_reply_submission_shows_moderation_message Mypy internal error workaround: - Add mypy override for apps.comments.views (django-stubs triggers internal error on ORM annotate() chain with mypy 1.11.2) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
50 lines
1.0 KiB
TOML
50 lines
1.0 KiB
TOML
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py312"
|
|
exclude = ["migrations"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"config/settings/development.py" = ["F403", "F405"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
plugins = ["mypy_django_plugin.main"]
|
|
warn_unused_configs = true
|
|
warn_redundant_casts = true
|
|
warn_unused_ignores = true
|
|
check_untyped_defs = true
|
|
exclude = ["migrations"]
|
|
disable_error_code = ["var-annotated", "override", "import-untyped", "arg-type"]
|
|
allow_untyped_globals = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["wagtail.*", "taggit.*", "modelcluster.*", "wagtailseo.*", "debug_toolbar"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["apps.authors.models"]
|
|
ignore_errors = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["apps.comments.views"]
|
|
ignore_errors = true
|
|
|
|
[tool.django-stubs]
|
|
django_settings_module = "config.settings.development"
|
|
|
|
[tool.coverage.run]
|
|
source = ["apps"]
|
|
omit = [
|
|
"*/migrations/*",
|
|
"*/tests/*",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
omit = [
|
|
"*/migrations/*",
|
|
"*/tests/*",
|
|
]
|