From 6f400211118997b13af7395e14030be95e9cdf20 Mon Sep 17 00:00:00 2001 From: Nitzan Date: Sun, 28 Sep 2025 19:22:21 +0300 Subject: [PATCH] Set @classmethod in phone_numbers.py schema getter --- pydantic_extra_types/color.py | 4 ++-- pydantic_extra_types/s3.py | 2 +- tests/test_coordinate.py | 4 ++-- tests/test_pendulum_dt.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pydantic_extra_types/color.py b/pydantic_extra_types/color.py index 18d9633..b64ae3b 100644 --- a/pydantic_extra_types/color.py +++ b/pydantic_extra_types/color.py @@ -1,9 +1,9 @@ """Color definitions are used as per the CSS3 [CSS Color Module Level 3](http://www.w3.org/TR/css3-color/#svg-color) specification. -A few colors have multiple names referring to the sames colors, eg. `grey` and `gray` or `aqua` and `cyan`. +A few colors have multiple names referring to the same colors, e.g. `grey` and `gray` or `aqua` and `cyan`. -In these cases the _last_ color when sorted alphabetically takes preferences, +In these cases the _last_ color when sorted alphabetically takes precedence. eg. `Color((0, 255, 255)).as_named() == 'cyan'` because "cyan" comes after "aqua". """ diff --git a/pydantic_extra_types/s3.py b/pydantic_extra_types/s3.py index edb7d44..b58068c 100644 --- a/pydantic_extra_types/s3.py +++ b/pydantic_extra_types/s3.py @@ -17,7 +17,7 @@ class S3Path(str): """An object representing a valid S3 path. This type also allows you to access the `bucket` and `key` component of the S3 path. - It also contains the `last_key` which represents the last part of the path (tipically a file). + It also contains the `last_key` which represents the last part of the path (typically a file). ```python from pydantic import BaseModel diff --git a/tests/test_coordinate.py b/tests/test_coordinate.py index eb9e1c0..d3a06cc 100644 --- a/tests/test_coordinate.py +++ b/tests/test_coordinate.py @@ -112,7 +112,7 @@ def test_limit_for_coordinate(coord: (Any, Any), error: Optional[Pattern]): ('-90.0', True), (Decimal('90.0'), True), (Decimal('-90.0'), True), - # Unvalid latitude + # Invalid latitude (91.0, False), (-91.0, False), (Decimal('91.0'), False), @@ -144,7 +144,7 @@ def test_format_latitude(latitude: float, valid: bool): (-180.0, True), (Decimal('180.0'), True), (Decimal('-180.0'), True), - # Unvalid latitude + # Invalid latitude (181.0, False), (-181.0, False), (Decimal('181.0'), False), diff --git a/tests/test_pendulum_dt.py b/tests/test_pendulum_dt.py index 68d5bc3..15b4aa3 100644 --- a/tests/test_pendulum_dt.py +++ b/tests/test_pendulum_dt.py @@ -178,7 +178,7 @@ def test_pendulum_dt_from_serialized_preserves_timezones(dt): pendulum.now().to_iso8601_string(), pendulum.now().to_w3c_string(), 'Sat Oct 11 17:13:46 UTC 2003', # date util parsing - pendulum.now().to_iso8601_string()[:5], # actualy valid or pendulum.parse(dt, strict=False) would fail here + pendulum.now().to_iso8601_string()[:5], # actually valid or pendulum.parse(dt, strict=False) would fail here ], ) def test_pendulum_dt_not_strict_from_serialized(dt):