Skip to content

Commit

Permalink
⬆ Bump ruff version to 0.3.0(#150)
Browse files Browse the repository at this point in the history
* ⬆ Bump the python-packages group with 1 update

Bumps the python-packages group with 1 update: [ruff](https://github.com/astral-sh/ruff).


Updates `ruff` from 0.2.2 to 0.3.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.2.2...v0.3.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>

* ♻️ Update Makefile commands for linting and formatting

* 🎨 Add blank lines to separate imports from code in multiple files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yasser Tahiri <yasserth19@gmail.com>
  • Loading branch information
dependabot[bot] and yezz123 authored Mar 1, 2024
1 parent 7dd7a2c commit 0b3191b
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ refresh-lockfiles:

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

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

.PHONY: mypy
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
In these cases the _last_ color when sorted alphabetically takes preferences,
eg. `Color((0, 255, 255)).as_named() == 'cyan'` because "cyan" comes after "aqua".
"""

from __future__ import annotations

import math
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[`Longitude`][pydantic_extra_types.coordinate.Longitude], and
[`Coordinate`][pydantic_extra_types.coordinate.Coordinate] data types.
"""

from dataclasses import dataclass
from typing import Any, ClassVar, Tuple, Type

Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/country.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Country definitions that are based on the [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
"""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/currency_code.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Currency definitions that are based on the [ISO4217](https://en.wikipedia.org/wiki/ISO_4217).
"""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/language_code.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Language definitions that are based on the [ISO 639-3](https://en.wikipedia.org/wiki/ISO_639-3) & [ISO 639-5](https://en.wikipedia.org/wiki/ISO_639-5).
"""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/phone_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This class depends on the [phonenumbers] package, which is a Python port of Google's [libphonenumber].
"""

from __future__ import annotations

from typing import Any, Callable, ClassVar, Generator
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/routing_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
The `pydantic_extra_types.routing_number` module provides the
[`ABARoutingNumber`][pydantic_extra_types.routing_number.ABARoutingNumber] data type.
"""

from typing import Any, ClassVar, Type

from pydantic import GetCoreSchemaHandler
Expand Down
1 change: 1 addition & 0 deletions pydantic_extra_types/ulid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This class depends on the [python-ulid] package, which is a validate by the [ULID-spec](https://github.com/ulid/spec#implementations-in-other-languages).
"""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion requirements/linting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pre-commit==3.6.2
# via -r requirements/linting.in
pyyaml==6.0.1
# via pre-commit
ruff==0.2.2
ruff==0.3.0
# via -r requirements/linting.in
typing-extensions==4.10.0
# via mypy
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ulid.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class Something(BaseModel):
(_ULID.from_str('01BTGNYV6HRNK8K8VKZASZCFPE'), '01BTGNYV6HRNK8K8VKZASZCFPE', True),
(_ULID.from_str('01BTGNYV6HRNK8K8VKZASZCFPF'), '01BTGNYV6HRNK8K8VKZASZCFPF', True),
# Invalid _ULID for bytes format
(b'\x01\xBA\x1E\xB2\x8A\x9F\xFAy\x10\xD5\xA5k\xC8', None, False), # Invalid ULID (short length)
(b'\x01\xBA\x1E\xB2\x8A\x9F\xFAy\x10\xD5\xA5k\xC8\xB6\x00', None, False), # Invalid ULID (long length)
(b'\x01\xba\x1e\xb2\x8a\x9f\xfay\x10\xd5\xa5k\xc8', None, False), # Invalid ULID (short length)
(b'\x01\xba\x1e\xb2\x8a\x9f\xfay\x10\xd5\xa5k\xc8\xb6\x00', None, False), # Invalid ULID (long length)
# Valid ULID for int format
(109667145845879622871206540411193812282, '2JG4FVY7N8XS4GFVHPXGJZ8S9T', True),
(109667145845879622871206540411193812283, '2JG4FVY7N8XS4GFVHPXGJZ8S9V', True),
Expand Down

0 comments on commit 0b3191b

Please sign in to comment.