diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d877603..736d685 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,7 +21,7 @@ assignees: ''
Reproducible example

```py - +# example here ``` ``` diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5acfd73..5ecdbbf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,15 +1,6 @@ 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] @@ -17,16 +8,25 @@ repos: # 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: @@ -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'] @@ -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 diff --git a/README.md b/README.md index 3087c7e..e549b22 100644 --- a/README.md +++ b/README.md @@ -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) ``` diff --git a/pyproject.toml b/pyproject.toml index 719a0c7..68aa02f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 @@ -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"]}