Add a branch reference fixer as a pre-commit hook

- many *.py and *.ipynb files will contain links to resources on
  GitHub or nbviewer that have branch references in them
- add a pre-commit hook implemented as the nox session
  "fix-branch-references" that goes through these files and
  changes all the branch labels to the current one
This commit is contained in:
Alexander Hess 2020-08-10 16:51:02 +02:00
commit ac5804174d
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
3 changed files with 108 additions and 9 deletions

View file

@ -88,7 +88,7 @@ extend-ignore =
B950,
# Comply with black's style.
# Source: https://github.com/psf/black/blob/master/docs/compatible_configs.md#flake8
E203, W503,
E203, W503, WPS348,
# f-strings are ok.
WPS305,
# Classes should not have to specify a base class.
@ -125,6 +125,8 @@ per-file-ignores =
WPS213,
# No overuse of string constants (e.g., '--version').
WPS226,
# The noxfile is rather long => allow many noqa's.
WPS402,
src/urban_meal_delivery/configuration.py:
# Allow upper case class variables within classes.
WPS115,