Skip to content

Commit

Permalink
FIX: support HttpUrl in ByBindingName 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Nov 28, 2024
1 parent c7eed9d commit 528a91c
Show file tree
Hide file tree
Showing 3 changed files with 361 additions and 329 deletions.
6 changes: 3 additions & 3 deletions combadge/support/zeep/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ class ByBindingName:
Examples:
>>> ByBindingName(
>>> binding_name="{http://www.dataaccess.com/webservicesserver/}NumberConversionSoapBinding",
>>> address=Url("https://www.dataaccess.com/webservicesserver/NumberConversion.wso",
>>> address=HttpUrl("https://www.dataaccess.com/webservicesserver/NumberConversion.wso",
>>> )
)
"""

binding_name: str
address: HttpUrl | str
address: HttpUrl | Url | str

@property
def address_string(self) -> str:
"""Return the service address as a plain `#!python str`."""
if isinstance(self.address, Url):
if isinstance(self.address, (HttpUrl, Url)):
return str(self.address)
return self.address

Expand Down
Loading

0 comments on commit 528a91c

Please sign in to comment.