Skip to content

Commit

Permalink
Fix missing type on URL.port (#1097)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Sep 4, 2024
1 parent fd25c6f commit 267afb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/1097.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added missing type on :meth:`~yarl.URL.port` -- by :user:`bdraco`.
2 changes: 1 addition & 1 deletion yarl/_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def host(self) -> Optional[str]:
return _idna_decode(raw)

@cached_property
def port(self):
def port(self) -> Optional[int]:
"""Port part of URL, with scheme-based fallback.
None for relative URLs or URLs without explicit port and
Expand Down

0 comments on commit 267afb1

Please sign in to comment.