Skip to content

Commit

Permalink
Merge pull request #3925 from Szelethus/python9_pylint_false_positive
Browse files Browse the repository at this point in the history
[fix] Fix a pylint false positive with python3.9 or later
  • Loading branch information
Szelethus authored May 30, 2023
2 parents 363a533 + cac95ba commit 38e3236
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ 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.
# pylint: disable=E1121
_PlistParser.__init__(self, True, dict_type)
# After 3.9 interpreter.
else:
_PlistParser.__init__(self, dict_type) # pylint: disable=E1120

Expand Down

0 comments on commit 38e3236

Please sign in to comment.