Fix "SyntaxWarning: invalid escape sequence '\d'"

This commit is contained in:
Viet Nguyen 2024-11-12 14:45:35 +07:00 committed by GitHub
parent 74a6d0ca4a
commit da70378297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -165,8 +165,8 @@ BYTES_SEND = Counter()
class Tools: class Tools:
IP = compile("(?:\d{1,3}\.){3}\d{1,3}") IP = compile("(?:\\d{1,3}\\.){3}\\d{1,3}")
protocolRex = compile('"protocol":(\d+)') protocolRex = compile('"protocol":(\\d+)')
@staticmethod @staticmethod
def humanbytes(i: int, binary: bool = False, precision: int = 2): def humanbytes(i: int, binary: bool = False, precision: int = 2):