We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbef7cc commit a6eeae3Copy full SHA for a6eeae3
aiosmtpd/controller.py
@@ -88,13 +88,14 @@ def is_unspecified_address(address: str) -> bool:
88
@public
89
def convert_unspecified_to_localhost(
90
address: str
91
-) -> Literal["::1", "127.0.0.1"]:
+) -> str:
92
+ localhost = get_localhost()
93
address_dict = {
- "": get_localhost(),
94
+ "": localhost,
95
"0.0.0.0": "127.0.0.1", # nosec
96
"::": "::1", # nosec
97
}
- return address_dict.get(address, get_localhost())
98
+ return str(address_dict.get(address, localhost))
99
100
101
class _FakeServer(asyncio.StreamReaderProtocol):
0 commit comments