Skip to content

Commit

Permalink
[fix] Fix a pylint false positive with python9 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
Szelethus committed May 30, 2023
1 parent a07a74a commit 32582d5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ def __init__(self, dict_type=dict):
# To be backward compatible with old interpreters we need to call this
# function based on conditions:
params = _PlistParser.__init__.__code__.co_varnames
# Before 3.9 interpreter. When a newer interpreter is used, pylint will
# complain that too many arguments are used to invoke __init__, but
# with newer interpreters, this is deadcode.
if len(params) == 3 and "use_builtin_types" in params:
# Before 3.9 interpreter.
_PlistParser.__init__(self, True, dict_type)
_PlistParser.__init__(self, True, dict_type)# pylint: disable=E1121
# After 3.9 interpreter.
else:
_PlistParser.__init__(self, dict_type) # pylint: disable=E1120

Expand Down

0 comments on commit 32582d5

Please sign in to comment.