fix(types): P0 mypy — explicit binascii import, drop dead or None in ntlmssp
syslog_bridge.py: base64.binascii is not a public mypy-visible attribute; import binascii directly and reference binascii.Error at the except clause. Propagated to all 26 template subdirectory copies (all were drift-free). ntlmssp.py: `principal = username or None` widened the type to str | None for no runtime reason — _decode_str() always returns str. Drop the `or None`. Propagated to smb/ and rdp/ copies. 762 → 722 mypy errors (-40).
This commit is contained in:
@@ -120,7 +120,7 @@ def parse_type3(blob: bytes) -> Optional[dict]:
|
||||
if domain:
|
||||
principal = f"{domain}\\{username}"
|
||||
else:
|
||||
principal = username or None
|
||||
principal = username
|
||||
|
||||
return {
|
||||
"username": username,
|
||||
|
||||
Reference in New Issue
Block a user