Skip to content

Instantly share code, notes, and snippets.

@swerwath
Created October 7, 2019 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swerwath/860345b5b365a641f8a314a94cfcdd51 to your computer and use it in GitHub Desktop.
Save swerwath/860345b5b365a641f8a314a94cfcdd51 to your computer and use it in GitHub Desktop.
Regex for counting Python type hints in a diff file
grep -o -E '^\+.*(\) ->|[^\W0-9\)]\w*:) [^\W0-9]\w*' <DIFF FILE> | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment