Skip to content

Commit

Permalink
Pylint C0123: Using type() instead of isinstance() for a typecheck.
Browse files Browse the repository at this point in the history
Though there are unusual situations where these give different results.

Signed-off-by: Soyeon Park <[email protected]>
  • Loading branch information
sypark9646 committed Sep 4, 2023
1 parent 8d8f168 commit 34a062c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_elf_machine(filename):

# read e_machine
e_machine = f.read(2)[0]
if type(e_machine) is str:
if isinstance(e_machine, str):
e_machine = ord(e_machine)

return machine[e_machine]
Expand Down

0 comments on commit 34a062c

Please sign in to comment.