diff --git a/src/pixee/cli.py b/src/pixee/cli.py index 584c0d5..cfce8b0 100644 --- a/src/pixee/cli.py +++ b/src/pixee/cli.py @@ -35,6 +35,12 @@ ), } +# It's not ideal for the CLI to have to encode this information but it's necessary for now +DEFAULT_EXCLUDED_CODEMODS = { + "pixee:python/unused-imports", + "pixee:python/order-imports", +} + console = Console() @@ -263,6 +269,12 @@ def fix( if str(codemod) not in codemod_exclude and codemod.name not in codemod_exclude ] + elif not codemod_include: + all_codemods = [ + codemod + for codemod in all_codemods + if str(codemod) not in DEFAULT_EXCLUDED_CODEMODS + ] for lang, (codemodder, file_glob) in CODEMODDER_MAPPING.items(): if language and lang != language: