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

🔨 Update code formatting and linting configurations #144

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
args: ['--unsafe']
Expand All @@ -22,9 +22,3 @@ repos:
types: [python]
language: system
pass_filenames: false
- id: pyupgrade
name: Pyupgrade
entry: pyupgrade --py37-plus
types: [python]
language: system
exclude: "pydantic_extra_types/types/phone_numbers.py"
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@ refresh-lockfiles:

.PHONY: format
format:
black $(sources)
ruff --fix $(sources)
ruff format $(sources)

.PHONY: lint
lint:
ruff $(sources)
black $(sources) --check --diff
ruff format --check $(sources)

.PHONY: mypy
mypy:
mypy pydantic_extra_types

.PHONY: pyupgrade
pyupgrade:
pyupgrade --py37-plus `find pydantic_extra_types tests -name "*.py" -type f`

.PHONY: test
test:
coverage run -m pytest --durations=10
Expand Down
2 changes: 1 addition & 1 deletion pydantic_extra_types/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.5.0'
__version__ = "2.5.0"
Loading
Loading