Skip to content

Commit

Permalink
Seeing if my change broke tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
akfreed committed May 18, 2022
1 parent 42008ff commit c00ee62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hooks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, command: str, look_behind: str, args: List[str]):
self.look_behind = look_behind
self.command = command
# Will be [] if not run using pre-commit or if there are no committed files
self.files = self.get_added_files(args)
self.files = self.get_added_files()
self.edit_in_place = False

self.stdout = b""
Expand All @@ -35,9 +35,9 @@ def check_installed(self):
) # noqa: E501
self.raise_error(problem, details)

def get_added_files(self, args):
def get_added_files(self):
"""Find added files using git."""
added_files = args[1:] # 1: don't include the hook file
added_files = sys.argv[1:] # 1: don't include the hook file
# cfg files are used by uncrustify and won't be source files
added_files = [f for f in added_files if os.path.exists(f) and not f.endswith(".cfg")]

Expand Down

0 comments on commit c00ee62

Please sign in to comment.