some typing nits#6722
Conversation
Greptile SummaryThis PR makes minor typing and test-hygiene improvements across several files with no functional regressions. All changes are small, self-contained, and backward-compatible.
Confidence Score: 5/5All changes are narrow, non-breaking cleanups with no observable behavioral difference in normal usage. Every change is a safe refinement: types are narrowed to match already-enforced runtime invariants, attribute-access patterns are made more defensive, and deprecated test utilities are replaced with idiomatic pytest equivalents. No new logic is introduced, and the not isinstance(plugin, str) substitution in shared_tailwind.py is semantically identical given the union type constraint. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "some typing nits" | Re-trigger Greptile |
Merging this PR will not alter performance
Comparing Footnotes
|
| if isinstance(plugin, Mapping) and "import" in plugin | ||
| if not isinstance(plugin, str) and "import" in plugin |
There was a problem hiding this comment.
i dont like this one because it's a runtime check. despite the static typing, if this plugin object is not a str, it could be anything else and indexing into it with a str would be invalid. hence, checking if it's explicitly a Mapping makes the in check and subsequent __getitem__ call safe.
what was the motivation for this change? i might be misreading it.
No description provided.