Skip to content

Commit

Permalink
Make a comment about the deepcopys in generate_config
Browse files Browse the repository at this point in the history
  • Loading branch information
dokempf committed Nov 20, 2023
1 parent 5ba26fb commit c791069
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions precommit_recommendations/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def generate_config(hooks):
os.path.join(os.path.dirname(__file__), ".pre-commit-config.yaml"), "r"
) as f:
data = strictyaml.load(f.read())

# NB: The deepcopy's here might seem unnecessary, but they are required
# because modification of strictyaml objects is a difficult process.
output = copy.deepcopy(data)

def _remove_hook(hook_id):
Expand Down

0 comments on commit c791069

Please sign in to comment.