Skip to content

Commit 0b20a21

Browse files
release: 2.0.3 (#18)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 0a97512 commit 0b20a21

30 files changed

Lines changed: 123 additions & 5 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.0.2"
2+
".": "2.0.3"
33
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 2.0.3 (2025-12-09)
4+
5+
Full Changelog: [v2.0.2...v2.0.3](https://github.com/postgrid/postgrid-python/compare/v2.0.2...v2.0.3)
6+
7+
### Bug Fixes
8+
9+
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([da4eda9](https://github.com/postgrid/postgrid-python/commit/da4eda9cfa2f8713841e9668e01efc7e2e09a420))
10+
11+
12+
### Chores
13+
14+
* add missing docstrings ([3b3c572](https://github.com/postgrid/postgrid-python/commit/3b3c5722c15adddc6b388b05007cbc277559dc33))
15+
316
## 2.0.2 (2025-12-03)
417

518
Full Changelog: [v2.0.1...v2.0.2](https://github.com/postgrid/postgrid-python/compare/v2.0.1...v2.0.2)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "postgrid-python"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
description = "The official Python library for the PostGrid API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/postgrid/_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False):
243243
if TYPE_CHECKING:
244244
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
245245
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
246+
#
247+
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
248+
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
246249
class SequenceNotStr(Protocol[_T_co]):
247250
@overload
248251
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
251254
def __contains__(self, value: object, /) -> bool: ...
252255
def __len__(self) -> int: ...
253256
def __iter__(self) -> Iterator[_T_co]: ...
254-
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
255-
def count(self, value: Any, /) -> int: ...
256257
def __reversed__(self) -> Iterator[_T_co]: ...
257258
else:
258259
# just point this to a normal `Sequence` at runtime to avoid having to special case

src/postgrid/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "postgrid"
4-
__version__ = "2.0.2" # x-release-please-version
4+
__version__ = "2.0.3" # x-release-please-version

src/postgrid/types/address_verification_verify_response.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414

1515
class DataDetails(BaseModel):
16+
"""
17+
If you supply `includeDetails=true` as a query parameter, we will also populate an additional `details` field that follows the [Address Details](https://avdocs.postgrid.com/#address-details) schema.
18+
"""
19+
1620
box_id: Optional[str] = FieldInfo(alias="boxID", default=None)
1721
"""PO Box ID"""
1822

@@ -158,12 +162,22 @@ class DataDetails(BaseModel):
158162

159163

160164
class DataGeocodeResultLocation(BaseModel):
165+
"""Object that contains `lat`, `lng` properties with number values"""
166+
161167
lat: float
162168

163169
lng: float
164170

165171

166172
class DataGeocodeResult(BaseModel):
173+
"""
174+
If the `geocode=true` query parameter is supplied, the response will include a geocodeResult
175+
which follows the [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request
176+
this feature be enabled by emailing `support@postgrid.com`. This includes our verification, batch
177+
verification, suggestions, and POST /completions endpoint. Note that you must supply country when
178+
geocoding to get the result successfully.
179+
"""
180+
167181
accuracy: float
168182
"""
169183
A real number from 0.00 to 1.00 which represents an

src/postgrid/types/errors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111

1212
class Errors(BaseModel):
13+
"""Errors encountered during address verification."""
14+
1315
city: Optional[List[str]] = None
1416
"""Errors related to the city."""
1517

src/postgrid/types/intl_address_verification_verify_response.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414

1515
class DataDetails(BaseModel):
16+
"""
17+
Additional details about the verified address, such as premise, thoroughfare, and locality.
18+
"""
19+
1620
building: Optional[str] = None
1721
"""The building name or number."""
1822

@@ -114,6 +118,8 @@ class DataDetails(BaseModel):
114118

115119

116120
class DataGeoData(BaseModel):
121+
"""Geocoding result for the verified address."""
122+
117123
geo_accuracy: Optional[str] = FieldInfo(alias="geoAccuracy", default=None)
118124
"""The geocode accuracy."""
119125

@@ -125,6 +131,8 @@ class DataGeoData(BaseModel):
125131

126132

127133
class DataSummary(BaseModel):
134+
"""A summary of the verification process and match levels."""
135+
128136
context_identification_match_level: Optional[str] = FieldInfo(alias="contextIdentificationMatchLevel", default=None)
129137
"""Context identification match level."""
130138

@@ -158,6 +166,8 @@ class DataSummary(BaseModel):
158166

159167

160168
class Data(BaseModel):
169+
"""The result of a verified international address."""
170+
161171
city: str
162172
"""The city or locality."""
163173

src/postgrid/types/print_mail/attached_pdf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
class AttachedPdf(BaseModel):
11+
"""Model representing an attached PDF."""
12+
1113
file: str
1214
"""The file (multipart form upload) or URL pointing to a PDF for the attached PDF."""
1315

src/postgrid/types/print_mail/attached_pdf_param.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
class AttachedPdfParam(TypedDict, total=False):
11+
"""Model representing an attached PDF."""
12+
1113
file: Required[str]
1214
"""The file (multipart form upload) or URL pointing to a PDF for the attached PDF."""
1315

0 commit comments

Comments
 (0)