Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Fix a pylint false positive with python3.9 or later #3925

Merged
merged 1 commit into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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