Commit 55e5558
committed
Enhance ImportAnalyzer to accurately classify imports
This commit improves the ImportAnalyzer class by refining the logic for classifying imports as "third_party" or "local". It introduces checks to ensure that modules found in site-packages are correctly identified as third-party, even if they are resolved as local imports. Additionally, it streamlines the import classification process by removing redundant checks, enhancing the overall accuracy and efficiency of the import analysis.1 parent a41a465 commit 55e5558
1 file changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
233 | 246 | | |
234 | 247 | | |
235 | 248 | | |
236 | 249 | | |
237 | 250 | | |
238 | 251 | | |
239 | 252 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 253 | | |
246 | 254 | | |
247 | 255 | | |
| |||
341 | 349 | | |
342 | 350 | | |
343 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
344 | 355 | | |
345 | 356 | | |
346 | 357 | | |
| |||
0 commit comments