Commit 71a910e
authored
Lint Python: Ignore ruff rule PLC0415 (#3195)
https://docs.astral.sh/ruff/rules/import-outside-top-level
There are several valid reasons for conditionally importing Python modules, especially for OS-specific code, so let's intentionally ignore this rule.
% `ruff check --select=PLC0415`
```
Error: gyp/pylib/gyp/MSVSVersion.py:222:5: PLC0415 `import` should be at the top-level of a file
Error: gyp/pylib/gyp/__init__.py:492:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/pylib/gyp/generator/make.py:81:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/pylib/gyp/generator/ninja.py:1998:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/pylib/gyp/generator/ninja.py:2021:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/pylib/gyp/generator/ninja.py:2091:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/pylib/gyp/mac_tool.py:145:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/test_gyp.py:151:9: PLC0415 `import` should be at the top-level of a file
Error: gyp/test_gyp.py:157:9: PLC0415 `import` should be at the top-level of a file
```1 parent 27f5505 commit 71a910e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments