Utilities for refactoring imports in Python-like syntax. Provides functions to categorize, modify, and reformat import statements. Current version 3.0.2, requires Python >=3.7. Maintained by asottile with regular updates.
pip install aspy.refactor_importsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates categorizing import lines into types using aspy.refactor_imports.
Replace calls to removed functions with new API.
Ensure the classifier takes a single import line string and returns an `ImportType` enum member.
Use `categorize_imports` directly.