Skip to content

Commit 6b31f50

Browse files
committed
Update pre-commit hooks.
1 parent c0092bb commit 6b31f50

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ repos:
1313
exclude: 'setup.cfg'
1414
- id: debug-statements
1515
- repo: https://github.com/asottile/pyupgrade
16-
rev: 'v2.16.0'
16+
rev: 'v2.19.1'
1717
hooks:
1818
- id: pyupgrade
1919
args:
2020
- --py36-plus
21-
- repo: https://github.com/pycqa/isort
21+
- repo: https://github.com/PyCQA/isort
2222
rev: '5.8.0'
2323
hooks:
2424
- id: isort
2525
- repo: https://github.com/psf/black
26-
rev: '21.5b1'
26+
rev: '21.5b2'
2727
hooks:
2828
- id: black
2929
- repo: https://github.com/PyCQA/flake8
3030
rev: '3.9.2'
3131
hooks:
3232
- id: flake8
33-
- repo: https://github.com/pycqa/pydocstyle
34-
rev: '6.0.0'
33+
- repo: https://github.com/PyCQA/pydocstyle
34+
rev: '6.1.1'
3535
hooks:
3636
- id: pydocstyle
3737
exclude: |

flow/project.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class IgnoreConditions(IntFlag):
111111
def __invert__(self):
112112
# Compute the largest number of bits used to represent one of the flags
113113
# so that we can XOR the appropriate number.
114-
max_bits = len(bin(max([elem.value for elem in type(self)]))) - 2
114+
max_bits = len(bin(max(elem.value for elem in type(self)))) - 2
115115
return self.__class__((2 ** max_bits - 1) ^ self._value_)
116116

117117
NONE = 0
@@ -2687,7 +2687,7 @@ def print_status(
26872687
for hit in file_timing.iterHits()
26882688
]
26892689
sorted_hits = reversed(sorted(hits, key=lambda hit: hit[2]))
2690-
total_num_hits = sum([hit[2] for hit in hits])
2690+
total_num_hits = sum(hit[2] for hit in hits)
26912691

26922692
profiling_results = ["# Profiling:\n"]
26932693

tests/test_project.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2044,8 +2044,8 @@ def test_main_run(self):
20442044
assert not job.doc.get("op2", False)
20452045
assert not job.doc.get("op3", False)
20462046

2047-
even_sum = sum([job.sp.i for job in project if job.sp.i % 2 == 0])
2048-
odd_sum = sum([job.sp.i for job in project if job.sp.i % 2 != 0])
2047+
even_sum = sum(job.sp.i for job in project if job.sp.i % 2 == 0)
2048+
odd_sum = sum(job.sp.i for job in project if job.sp.i % 2 != 0)
20492049

20502050
self.call_subcmd(
20512051
"run -o agg_op1 agg_op1_different agg_op1_custom agg_op2 agg_op3 --show-traceback"

0 commit comments

Comments
 (0)