Skip to content

Commit f27a132

Browse files
authored
📝 Fix Issue of Currency in docstring (#235)
* isolate url My shell added the dot to the url and brought me to a non existing wikipedia page. Adding a space after the url prevents that from happening * fix test
1 parent f843f37 commit f27a132

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pydantic_extra_types/currency_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _validate(cls, currency_symbol: str, _: core_schema.ValidationInfo) -> str:
132132
raise PydanticCustomError(
133133
'InvalidCurrency',
134134
'Invalid currency code.'
135-
' See https://en.wikipedia.org/wiki/ISO_4217. '
135+
' See https://en.wikipedia.org/wiki/ISO_4217 . '
136136
'Bonds, testing and precious metals codes are not allowed.',
137137
)
138138
return currency_symbol

tests/test_currency_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_forbidden_everyday(forbidden_currency):
5656
ValidationError,
5757
match=re.escape(
5858
'1 validation error for CurrencyCheckingModel\ncurrency\n '
59-
'Invalid currency code. See https://en.wikipedia.org/wiki/ISO_4217. '
59+
'Invalid currency code. See https://en.wikipedia.org/wiki/ISO_4217 . '
6060
'Bonds, testing and precious metals codes are not allowed. '
6161
f"[type=InvalidCurrency, input_value='{forbidden_currency}', input_type=str]"
6262
),

0 commit comments

Comments
 (0)