Commit 2578a33
feat(lint): Add automatic detection for function-level imports
Add ruff PLC (pylint conventions) rule to automatically detect
function-level imports, which violates PEP 8 guidelines.
Changes:
- Add PLC rule group to ruff select (includes PLC0415: import-outside-toplevel)
- Move urllib.parse import to top-level in src/sharepoint_auth.py
- Exclude PLC0415 from tests/** for legitimate test isolation needs
(e.g., config reload, mock ordering)
This prevents future violations like the one caught by Gemini Code Assist.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 71e4687 commit 2578a33
2 files changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | | - | |
136 | | - | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
0 commit comments