Commit 0000154
Refactor: Remove unused global state and improve hook priority
Based on comprehensive triple-agent code review findings:
1. Remove unused `_nodeids_with_warnings` global set:
- Set was populated but never consulted by production code
- Only used by one test, which has been updated
- Eliminates potential memory leak and thread safety concerns
2. Update test_warning_tracking_for_yellow_coloring:
- Now verifies `report.has_warnings` attribute directly
- More direct test of the actual implementation
- No longer depends on module-level state
3. Add `tryfirst=True` to pytest_report_teststatus hook:
- Ensures warnings plugin runs before other plugins
- Prevents potential plugin ordering issues
- Guarantees yellow markup is applied correctly
These changes address all critical issues identified in the meta-analysis
while maintaining 100% test coverage and functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 5b4100a commit 0000154
2 files changed
+29
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
102 | | - | |
103 | 99 | | |
104 | 100 | | |
105 | 101 | | |
| |||
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | | - | |
| 113 | + | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
| 907 | + | |
908 | 908 | | |
909 | 909 | | |
910 | | - | |
911 | | - | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
912 | 913 | | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
919 | 922 | | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
926 | 933 | | |
927 | | - | |
928 | | - | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
929 | 937 | | |
930 | | - | |
931 | | - | |
| 938 | + | |
| 939 | + | |
932 | 940 | | |
933 | 941 | | |
934 | 942 | | |
| |||
0 commit comments