Browse Source

tools/mpy-tool.py: Ignore linter failure in Python 2 compatibility code.

Found by Ruff checking F821.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
pull/12197/head
Angus Gratton 1 year ago
committed by Damien George
parent
commit
1a5c9b9da4
  1. 2
      tools/mpy-tool.py

2
tools/mpy-tool.py

@ -35,7 +35,7 @@ if platform.python_version_tuple()[0] == "2":
bytes_cons = lambda val, enc=None: bytearray(val) bytes_cons = lambda val, enc=None: bytearray(val)
is_str_type = lambda o: isinstance(o, str) is_str_type = lambda o: isinstance(o, str)
is_bytes_type = lambda o: type(o) is bytearray is_bytes_type = lambda o: type(o) is bytearray
is_int_type = lambda o: isinstance(o, int) or isinstance(o, long) is_int_type = lambda o: isinstance(o, int) or isinstance(o, long) # noqa: F821
def hexlify_to_str(b): def hexlify_to_str(b):
x = hexlify_py2(b) x = hexlify_py2(b)

Loading…
Cancel
Save