Merge pull request #1340 from PyCQA/pre-commit-ci-update-config

[pre-commit.ci] pre-commit autoupdate
This commit is contained in:
Anthony Sottile 2021-05-24 11:26:33 -07:00 committed by GitHub
commit 3bcadce2a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ repos:
- id: black
args: [--line-length=79]
- repo: https://github.com/asottile/pyupgrade
rev: v2.16.0
rev: v2.18.2
hooks:
- id: pyupgrade
args: [--py36-plus]

View file

@ -270,9 +270,9 @@ def parse_unified_diff(diff: Optional[str] = None) -> Dict[str, Set[int]]:
# So we can more simply check for a match instead of slicing and
# comparing.
if hunk_match:
(row, number_of_rows) = [
(row, number_of_rows) = (
1 if not group else int(group) for group in hunk_match.groups()
]
)
assert current_path is not None
parsed_paths[current_path].update(range(row, row + number_of_rows))