Skip to content

Commit

Permalink
Add codemods to be excluded by default
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella committed Dec 12, 2023
1 parent e28aa35 commit c765f32
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/pixee/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c765f32

Please sign in to comment.