Simplify typed-tab internals (ponytail audit) - #22
Merged
Merged
Conversation
No behaviour change. Applies the repo-wide over-engineering audit:
- typed.py: shared _host_q() replaces the duplicated Q-OR loop in the
badge and the view; one error-render path instead of two; field_info
tuples unpacked directly (producers always emit 5-tuples); drop the
get_verbose_name AttributeError guard, the seen_field_keys de-dup set
(querysets are disjoint on is_polymorphic) and the __qualname__ assignment.
- views/__init__.py: drop ImportError/LookupError fallbacks that ready()'s
gate already makes unreachable; drop the cosmetic dispatcher rename.
- typed/tab.html: bulk-action buttons moved to typed/bulk_buttons.html
include (was pasted twice); duplicate {% csrf_token %} removed.
- pyproject: package-data "**/*" already covers templates; MANIFEST.in removed.
- tests: field_info fixtures use the 5-tuple contract; obsolete 2-tuple test removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repo-wide over-engineering audit applied. No behaviour change.
typed.py: shared_host_q()for badge + view querysets; one error-render path;field_infounpacked directly (producers always emit 5-tuples); droppedget_verbose_nameAttributeError guard,seen_field_keysde-dup set (querysets disjoint onis_polymorphic),__qualname__assignment.views/__init__.py: dropped ImportError/LookupError fallbacks that theready()gate makes unreachable; dropped cosmetic dispatcher rename.typed/tab.html: bulk-action buttons moved totyped/bulk_buttons.htmlinclude (was pasted twice); duplicate{% csrf_token %}removed.pyproject.toml:package-data**/*already covers templates;MANIFEST.inremoved.Verification
pytest tests/(36 passed)cotab2-parent/1(all tabs 200, ours active), dispatcher 404 on unknown slug, bulk buttons / csrf / Add button still rendered.