Skip to content

Commit

Permalink
🔨 Update code formatting and linting configurations (#144)
Browse files Browse the repository at this point in the history
* 🔨 Update code formatting and linting configurations

* ⬆️ Update linting and testing dependencies

* ♻️ lint files

* ⬆️ Update pre-commit hooks version to v4.5.0
  • Loading branch information
yezz123 authored Feb 27, 2024
1 parent 10386a9 commit d106920
Show file tree
Hide file tree
Showing 33 changed files with 945 additions and 982 deletions.
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

0 comments on commit d106920

Please sign in to comment.