File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- Skip expensive isort-based import classification in ``leave_module``
2- when no import-ordering message is enabled (``wrong-import-order``,
3- ``ungrouped-imports``, ``wrong-import-position``). Also cache the
4- ``isort.Config`` object so it is built once instead of once per import
5- statement. Both changes save ~6 s on ansible (564 files), a 17%
6- reduction whether only ``cyclic-import`` is enabled (isort skipped
7- entirely) or import-ordering checks are active (cached config avoids
8- rebuilding it per import).
1+ Skip isort classification in the import checker when no import-ordering message is enabled,
2+ and cache the isort configuration so it is built once instead of once per import statement.
3+ Skipping the isort processing become a negligible improvement once the caching is applied.
4+ pylint became ~17% faster on ansible (~=4500 imports) even with isort enabled.
95
106Refs #10886, #2866, #10637
You can’t perform that action at this time.
0 commit comments