Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopting ruff formatter #7930

Merged
merged 17 commits into from Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions Makefile
Expand Up @@ -25,13 +25,11 @@ rebuild-lockfiles: .pdm

.PHONY: format ## Auto-format python source files
format: .pdm
pdm run black $(sources)
pdm run ruff --fix $(sources)
sydney-runkle marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: lint ## Lint python source files
lint: .pdm
pdm run ruff $(sources)
pdm run black $(sources) --check --diff

.PHONY: codespell ## Use Codespell to do spellchecking
codespell: .pre-commit
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.md
Expand Up @@ -90,8 +90,8 @@ Run tests and linting locally to make sure everything is working as expected.
```bash
# Run automated code formatting and linting
make format
# Pydantic uses black and ruff
# (https://github.com/ambv/black, https://github.com/charliermarsh/ruff)
# Pydantic uses ruff
# https://github.com/charliermarsh/ruff

# Run tests and linting
make
Expand Down