diff --git a/CHANGELOG.md b/CHANGELOG.md index 0501f14..583457b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.3.0 (2024-03-14) + +Add a new rule: +- `PYD006` - *Duplicate field name* + +Will raise an error with the following: + +```python +class Model(BaseModel): + x: int + x: int = 1 +``` + ## 0.2.0 (2024-02-24) Add three new rules: diff --git a/pyproject.toml b/pyproject.toml index 2dc5b09..c8d06a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "flake8-pydantic" -version = "0.2.0" +version = "0.3.0" description = "A flake8 plugin to check Pydantic related code." readme = "README.md" authors = [ diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 1ac6276..4cd32be 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -4,15 +4,15 @@ # # pip-compile requirements/requirements-dev.in # -mypy==1.8.0 +mypy==1.9.0 # via -r requirements/requirements-dev.in mypy-extensions==1.0.0 # via mypy -ruff==0.2.2 +ruff==0.3.2 # via -r requirements/requirements-dev.in tomli==2.0.1 # via mypy -typing-extensions==4.9.0 +typing-extensions==4.10.0 # via # -c requirements/requirements.txt # mypy diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 3cca4f8..5120f0d 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -4,7 +4,7 @@ # # pip-compile requirements/requirements-test.in # -cachetools==5.3.2 +cachetools==5.3.3 # via tox chardet==5.2.0 # via tox @@ -20,7 +20,7 @@ filelock==3.13.1 # virtualenv iniconfig==2.0.0 # via pytest -packaging==23.2 +packaging==24.0 # via # pyproject-api # pytest @@ -35,14 +35,14 @@ pluggy==1.4.0 # tox pyproject-api==1.6.1 # via tox -pytest==8.0.1 +pytest==8.1.1 # via -r requirements/requirements-test.in tomli==2.0.1 # via # pyproject-api # pytest # tox -tox==4.13.0 +tox==4.14.1 # via # -r requirements/requirements-test.in # tox-gh-actions diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 05c3e2e..6f77452 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -12,13 +12,13 @@ mccabe==0.7.0 # via flake8 pycodestyle==2.11.1 # via flake8 -pydantic==2.6.1 +pydantic==2.6.4 # via -r requirements/requirements.in -pydantic-core==2.16.2 +pydantic-core==2.16.3 # via pydantic pyflakes==3.2.0 # via flake8 -typing-extensions==4.9.0 +typing-extensions==4.10.0 # via # pydantic # pydantic-core diff --git a/src/flake8_pydantic/errors.py b/src/flake8_pydantic/errors.py index d52ebe6..5edac2b 100644 --- a/src/flake8_pydantic/errors.py +++ b/src/flake8_pydantic/errors.py @@ -49,7 +49,7 @@ class PYD005(Error): class PYD006(Error): - error_code = "PYD005" + error_code = "PYD006" message = "Duplicate field name"