Skip to content

Commit 24b9e1e

Browse files
committed
misc tidy
- misc lint - update pre-commit hooks - update PR template AI policy
1 parent 2a9e4e8 commit 24b9e1e

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎.github/PULL_REQUEST_TEMPLATE/pr.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ about: Use this template for proposing change(s)
99
+ [ ] documentation modification
1010
+ [ ] new feature
1111
- [ ] If applicable, I have mentioned the relevant/related issue(s)
12-
- [ ] Any AI-assisted commits are clearly marked ([author], [Co-authored-by] or [Assisted-by])
12+
- [ ] Any AI-assisted commits are clearly marked ([author], [Co-authored-by] or [Assisted-by]) using the syntax `Provider Model <email>`, e.g. `Co-authored-by: Claude Opus 5 <[email protected]>`
1313

1414
Less important but also useful:
1515

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ repos:
7272
- id: pyupgrade
7373
args: [--py38-plus]
7474
- repo: https://github.com/PyCQA/isort
75-
rev: 9.0.0b1
75+
rev: 9.0.1
7676
hooks:
7777
- id: isort
7878
- repo: https://github.com/kynan/nbstripout

‎tests/tests_concurrent.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def dummy_func(x):
1212

1313

1414
def test_min_map_len():
15-
"""GH #1828: must not raise when every iterable has an unknown length (or there are none)"""
1615
assert concurrent._min_map_len([]) == 0
1716
assert concurrent._min_map_len([(i for i in range(9))]) == 0
1817
assert concurrent._min_map_len([(i for i in range(9)), range(5)]) == 5
@@ -31,8 +30,7 @@ def test_concurrent_map(mapper, caperr):
3130

3231

3332
@mark.parametrize("mapper", [interpreter_map, process_map, thread_map])
34-
def test_concurrent_map_no_length_hint(mapper, caperr):
35-
"""GH #1828: iterables with no length hint (e.g. generators) shouldn't raise `ValueError`"""
33+
def test_concurrent_map_unknown_len(mapper, caperr):
3634
b = [i + 1 for i in range(9)]
3735
try:
3836
assert mapper(dummy_func, (i for i in range(9))) == b

‎tqdm/contrib/concurrent.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _get_interpreter_init(tqdm_class, lock_queue_id):
100100

101101

102102
def _min_map_len(iterables):
103-
"""min(map(length_hint, iterables)), ignoring unknown lengths [default: 0]"""
103+
"""min(map(length_hint, iterables), default=0)"""
104104
return min((n for it in iterables if (n := length_hint(it, -1)) >= 0), default=0)
105105

106106

0 commit comments

Comments
 (0)