Loading hooks/copyright.py +2 −2 Original line number Diff line number Diff line #!/usr/bin/env python3 # Copyright 2021 Dominik Sekotill <dom.sekotill@kodo.org.uk> # Copyright 2021, 2022 Dominik Sekotill <dom.sekotill@kodo.org.uk> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. Loading Loading @@ -68,7 +68,7 @@ def get_file_years(paths: List[Path]) -> Dict[Path, str]: cmd.extend(p.as_posix() for p in paths) proc = run(cmd, stdout=PIPE, check=True) regex = re.compile(br'(?P<year>[0-9]{4,})(?:\n|\r|\r\n)(?P<files>.*?)\x00\x00') regex = re.compile(br'(?P<year>[0-9]{4,})(?:\n|\r|\r\n)(?P<files>.*?)(\x00\x00|$)') for match in regex.finditer(proc.stdout): year = match.group('year').decode() for path in split_paths(match.group('files')): Loading Loading
hooks/copyright.py +2 −2 Original line number Diff line number Diff line #!/usr/bin/env python3 # Copyright 2021 Dominik Sekotill <dom.sekotill@kodo.org.uk> # Copyright 2021, 2022 Dominik Sekotill <dom.sekotill@kodo.org.uk> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. Loading Loading @@ -68,7 +68,7 @@ def get_file_years(paths: List[Path]) -> Dict[Path, str]: cmd.extend(p.as_posix() for p in paths) proc = run(cmd, stdout=PIPE, check=True) regex = re.compile(br'(?P<year>[0-9]{4,})(?:\n|\r|\r\n)(?P<files>.*?)\x00\x00') regex = re.compile(br'(?P<year>[0-9]{4,})(?:\n|\r|\r\n)(?P<files>.*?)(\x00\x00|$)') for match in regex.finditer(proc.stdout): year = match.group('year').decode() for path in split_paths(match.group('files')): Loading