fix(pterodactyl): pylint fixes
All checks were successful
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 21s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 24s

This commit is contained in:
SeaswimmerTheFsh 2024-03-01 23:43:46 -05:00
parent 45797361a6
commit 882b0386f2
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
2 changed files with 6 additions and 6 deletions

View file

@ -254,8 +254,8 @@ async def generate_achievement_embed(username: str, achievement: str, challenge:
return embed
def mask_ip(string: str) -> str:
def mask_ip(match):
def check(match):
ip = match.group(0)
masked_ip = '.'.join(r'\*' * len(octet) for octet in ip.split('.'))
return masked_ip
return re.sub(r'\b(?:\d{1,3}\.){3}\d{1,3}\b', mask_ip, string)
return re.sub(r'\b(?:\d{1,3}\.){3}\d{1,3}\b', check, string)