Skip to content

Commit

Permalink
⚡ Avoid bottleneck from frequent tqdm updates (#32)
Browse files Browse the repository at this point in the history
* ⚡ 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
  • Loading branch information
ddelange committed Nov 4, 2022
1 parent b1af9c3 commit 04a5fe4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*.txt') }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements/*.txt') }}

- name: Pre-commit cache
uses: actions/cache@v2
Expand Down
32 changes: 16 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v0.14.3
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: .*/tests/.*

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

- repo: https://github.com/timothycrosley/isort
rev: 5.5.4
rev: 5.10.1
hooks:
- id: isort

Expand All @@ -26,29 +26,29 @@ repos:
pass_filenames: false

- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
rev: 4.0.1 # flake8-comprehensions 3.7.0 depends on flake8!=3.2.0, <5 and >=3.0
hooks:
- id: flake8
additional_dependencies: [
'darglint~=1.5.4',
'darglint~=1.8.1',
'flake8-absolute-import~=1.0',
'flake8-blind-except~=0.1.1',
'flake8-builtins~=1.5.3',
'flake8-blind-except~=0.2.1',
'flake8-builtins~=2.0', # last version to support py3.6
'flake8-cognitive-complexity==0.1.0',
'flake8-comprehensions~=3.2.3',
'flake8-docstrings~=1.5.0',
'flake8-logging-format~=0.6.0',
'flake8-comprehensions~=3.7', # last version to support py3.6
'flake8-docstrings~=1.6.0',
'flake8-logging-format~=0.8.1',
'flake8-mutable~=1.2.0',
'flake8-print~=3.1.4',
'flake8-print~=4.0', # last version to support py3.6
'flake8-printf-formatting~=1.1.0',
'flake8-pytest-style~=1.2.3',
'flake8-quotes~=3.2.0',
'flake8-pytest-style~=1.6.0',
'flake8-quotes~=3.3.1',
'flake8-tuple~=0.4.1',
'pep8-naming~=0.11.1'
'pep8-naming~=0.13.1' # last version to support py3.6
]

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

- repo: https://github.com/econchick/interrogate
rev: 1.3.1
rev: 1.5.0
hooks:
- id: interrogate
pass_filenames: false
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_section = THIRDPARTY
known_first_party = tests

[flake8]
ignore = D10,E203,E501,W503
ignore = B902,D10,E203,E501,W503
max-line-length = 88
inline-quotes = double
docstring-convention = google
Expand Down
2 changes: 1 addition & 1 deletion src/mapply/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def some_heavy_computation(x, power):

logger = logging.getLogger(__name__)

tqdm = partial(_tqdm, dynamic_ncols=True)
tqdm = partial(_tqdm, dynamic_ncols=True, smoothing=0.042, mininterval=0.42)


def sensible_cpu_count() -> int:
Expand Down

0 comments on commit 04a5fe4

Please sign in to comment.