Skip to content

Commit 04a5fe4

Browse files
authored
⚡ Avoid bottleneck from frequent tqdm updates (#32)
* ⚡ Avoid bottleneck from frequent tqdm updates * 🚨 Make lint * 📌 Revert black to 22.8.0 psf/black#3169 (comment) * 📌 Revert flake8-builtins to 2.0.0 * 📌 Revert flake8-comprehensions to 3.7 * 📌 Revert flake8-print to 4.0 * 📌 Revert pep8-naming to 0.13.1 * 📌 Revert flake8 to 4.0.1 * 📌 Revert pre-commit-hooks to 4.1.0
1 parent b1af9c3 commit 04a5fe4

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/cache@v2
3737
with:
3838
path: ~/.cache/pip
39-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*.txt') }}
39+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements/*.txt') }}
4040

4141
- name: Pre-commit cache
4242
uses: actions/cache@v2

.pre-commit-config.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
repos:
22
- repo: https://github.com/Yelp/detect-secrets
3-
rev: v0.14.3
3+
rev: v1.4.0
44
hooks:
55
- id: detect-secrets
66
args: ['--baseline', '.secrets.baseline']
77
exclude: .*/tests/.*
88

99
- repo: https://github.com/psf/black
10-
rev: 22.3.0
10+
rev: 22.8.0 # last version to support py3.6 ref https://github.com/psf/black/issues/3169#issuecomment-1303315799
1111
hooks:
1212
- id: black
1313

1414
- repo: https://github.com/timothycrosley/isort
15-
rev: 5.5.4
15+
rev: 5.10.1
1616
hooks:
1717
- id: isort
1818

@@ -26,29 +26,29 @@ repos:
2626
pass_filenames: false
2727

2828
- repo: https://github.com/PyCQA/flake8
29-
rev: 3.8.3
29+
rev: 4.0.1 # flake8-comprehensions 3.7.0 depends on flake8!=3.2.0, <5 and >=3.0
3030
hooks:
3131
- id: flake8
3232
additional_dependencies: [
33-
'darglint~=1.5.4',
33+
'darglint~=1.8.1',
3434
'flake8-absolute-import~=1.0',
35-
'flake8-blind-except~=0.1.1',
36-
'flake8-builtins~=1.5.3',
35+
'flake8-blind-except~=0.2.1',
36+
'flake8-builtins~=2.0', # last version to support py3.6
3737
'flake8-cognitive-complexity==0.1.0',
38-
'flake8-comprehensions~=3.2.3',
39-
'flake8-docstrings~=1.5.0',
40-
'flake8-logging-format~=0.6.0',
38+
'flake8-comprehensions~=3.7', # last version to support py3.6
39+
'flake8-docstrings~=1.6.0',
40+
'flake8-logging-format~=0.8.1',
4141
'flake8-mutable~=1.2.0',
42-
'flake8-print~=3.1.4',
42+
'flake8-print~=4.0', # last version to support py3.6
4343
'flake8-printf-formatting~=1.1.0',
44-
'flake8-pytest-style~=1.2.3',
45-
'flake8-quotes~=3.2.0',
44+
'flake8-pytest-style~=1.6.0',
45+
'flake8-quotes~=3.3.1',
4646
'flake8-tuple~=0.4.1',
47-
'pep8-naming~=0.11.1'
47+
'pep8-naming~=0.13.1' # last version to support py3.6
4848
]
4949

5050
- repo: https://github.com/pre-commit/pre-commit-hooks
51-
rev: v3.2.0
51+
rev: v4.1.0 # last version to support py3.6
5252
hooks:
5353
- id: mixed-line-ending
5454
args: ['--fix=lf']
@@ -62,7 +62,7 @@ repos:
6262
- id: debug-statements
6363

6464
- repo: https://github.com/econchick/interrogate
65-
rev: 1.3.1
65+
rev: 1.5.0
6666
hooks:
6767
- id: interrogate
6868
pass_filenames: false

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_section = THIRDPARTY
77
known_first_party = tests
88

99
[flake8]
10-
ignore = D10,E203,E501,W503
10+
ignore = B902,D10,E203,E501,W503
1111
max-line-length = 88
1212
inline-quotes = double
1313
docstring-convention = google

src/mapply/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def some_heavy_computation(x, power):
2929

3030
logger = logging.getLogger(__name__)
3131

32-
tqdm = partial(_tqdm, dynamic_ncols=True)
32+
tqdm = partial(_tqdm, dynamic_ncols=True, smoothing=0.042, mininterval=0.42)
3333

3434

3535
def sensible_cpu_count() -> int:

0 commit comments

Comments
 (0)