Skip to content

Commit

Permalink
👷 Bump pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange committed Feb 20, 2024
1 parent b3a8c01 commit f093add
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ assignees: ''
<details><summary>Reproducible example</summary><p>

```py
<example here>
# example here
```

```
Expand Down
30 changes: 15 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
# for new repo init run: `detect-secrets scan > .secrets.baseline`
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: .*/tests/.*
additional_dependencies: ['gibberish-detector']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
rev: v0.2.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

# should be replaced in the future ref https://github.com/astral-sh/ruff/issues/458
- repo: https://github.com/jsh9/pydoclint
rev: 0.3.4
rev: 0.4.1
hooks:
- id: pydoclint

- repo: https://github.com/Yelp/detect-secrets
# for new repo init run: `detect-secrets scan > .secrets.baseline`
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: .*/tests/.*
additional_dependencies: ['gibberish-detector']

# should be replaced in the future ref https://github.com/astral-sh/ruff/issues/3792
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: ['black==23.10.0']
additional_dependencies: ['black==24.2.0']

- repo: local
hooks:
Expand All @@ -44,7 +44,7 @@ repos:
args: ['--trailing-comma-inline-array']

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: mixed-line-ending
args: ['--fix=lf']
Expand All @@ -59,7 +59,7 @@ repos:
- id: debug-statements

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.1
rev: 0.28.0
hooks:
- id: check-dependabot
- id: check-github-workflows
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@ For documentation, see [mapply.readthedocs.io](https://mapply.readthedocs.io/en/
import pandas as pd
import mapply

mapply.init(
n_workers=-1,
chunk_size=100,
max_chunks_per_worker=8,
progressbar=False
)
mapply.init(n_workers=-1, chunk_size=100, max_chunks_per_worker=8, progressbar=False)

df = pd.DataFrame({"A": list(range(100))})

# avoid unnecessary multiprocessing:
# due to chunk_size=100, this will act as regular apply.
# set chunk_size=1 to skip this check and let max_chunks_per_worker decide.
df["squared"] = df.A.mapply(lambda x: x ** 2)
df["squared"] = df.A.mapply(lambda x: x**2)
```


Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ filterwarnings = ["ignore::DeprecationWarning"]
select = ["ALL"]
ignore = [
"D107", # we have pydoclint with class docstring
"D407", # we have google style docstrings
"E501", # we have black
"ANN", # we have mypy
"TRY003", # there is EM102
Expand All @@ -70,6 +69,9 @@ ignore = [
[tool.ruff.isort]
known-first-party = ["tests"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements/prod.txt"]}

Expand Down

0 comments on commit f093add

Please sign in to comment.