forked from narwhals-dev/narwhals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
48 lines (48 loc) · 1.34 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.6.3'
hooks:
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff
args: [--fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.2'
hooks:
- id: mypy
additional_dependencies: ['polars==1.4.1', 'pytest==8.3.2']
files: ^(narwhals|tests)/
- repo: https://github.com/codespell-project/codespell
rev: 'v2.3.0'
hooks:
- id: codespell
files: \.(py|rst|md)$
args: [--ignore-words-list=ser]
exclude: ^docs/api-completeness.md$
- repo: local
hooks:
- id: check-api-reference
name: check-api-reference
pass_filenames: false
entry: python -m utils.check_api_reference
language: python
additional_dependencies: [polars]
- id: imports-are-banned
name: import are banned (use `get_pandas` instead of `import pandas`)
entry: python utils/import_check.py
language: python
files: ^narwhals/
exclude: ^narwhals/dependencies\.py
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.18.0" # replace with latest tag on GitHub
hooks:
- id: blacken-docs
args: [--skip-errors]
additional_dependencies:
- black==22.12.0