Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ repos:
hooks:
- id: mypy
args:
[--install-types, --non-interactive, --config=pyproject.toml]
[--config=pyproject.toml]
additional_dependencies:
- types-cachetools
- types-pytest-lazy-fixture
- types-pytz
- types-requests
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ install: install-poetry install-dependencies ## Install Poetry and dependencies
check-license: ## Check license headers
./dev/check-license

lint: ## Run code linters via pre-commit
$(POETRY) run pre-commit run --all-files
lint: ## Run code linters via prek (pre-commit hooks)
$(POETRY) run prek run -a

# ===============
# Testing Section
Expand Down
8 changes: 4 additions & 4 deletions mkdocs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ pip install "git+https://github.com/apache/iceberg-python.git#egg=pyiceberg[pyar

## Linting

`pre-commit` is used for autoformatting and linting:
`prek` is used for autoformatting and linting:

```bash
make lint
```

Pre-commit will automatically fix the violations such as import orders, formatting etc. Pylint errors you need to fix yourself.
`prek` will automatically fix the violations such as import orders, formatting etc. Pylint errors you need to fix yourself.

In contrast to the name suggest, it doesn't run the checks on the commit. If this is something that you like, you can set this up by running `pre-commit install`.
In addition to manually running `make lint`, you can install the pre-commit hooks in your local repo with `prek install`. By doing this, linting is run automatically every time you make a commit.

You can bump the integrations to the latest version using `pre-commit autoupdate`. This will check if there is a newer version of `{black,mypy,isort,...}` and update the yaml.
You can bump the integrations to the latest version using `prek auto-update`. This will check if there is a newer version of `{black,mypy,isort,...}` and update the yaml.

## Cleaning

Expand Down
Loading