Skip to content

Commit

Permalink
Ignore pytype check for ProxyData class
Browse files Browse the repository at this point in the history
  • Loading branch information
wevsty committed Jun 16, 2021
1 parent de9f074 commit cbef7cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aiosmtpd/proxy_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ class ProxyData:
"""
Represents data received during PROXY Protocol Handshake, in an already-parsed form
"""


# pytype: disable=annotation-type-mismatch
version: Optional[int] = attr.ib(kw_only=True, init=True)
"""PROXY Protocol version; None if not recognized/malformed"""
command: Optional[V2_CMD] = _anoinit(default=None)
Expand Down Expand Up @@ -298,7 +299,8 @@ class ProxyData:
If not an empty string, contains the error encountered when parsing
"""
_tlv: Optional[ProxyTLV] = _anoinit(default=None)

# pytype: enable=annotation-type-mismatch

@property
def valid(self) -> bool:
return not (self.error or self.version is None or self.protocol is None)
Expand Down

0 comments on commit cbef7cc

Please sign in to comment.