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 handling of default value for extend action in Python 3.7 #6450

Merged
merged 1 commit into from
Apr 24, 2022

Conversation

DudeNr33
Copy link
Collaborator

  • Write a good description on what the PR does.
  • If you used multiple emails or multiple names when contributing, add your mails
    and preferred name in script/.contributors_aliases.json

Type of Changes

Type
🐛 Bug fix

Description

Using default=[] in Python 3.7 has the effect that values passed in for this parameter will be stored in the default list object. In subsequent runs (in the same process), the default value is wrongly prepopulated.

Python 3.8 and above handle this situation better, but as we have to support Python 3.7 this fix is necessary.

Ref: #6449 (comment)

This change should be covered e.g. by tests/pyreverse/test_main.py::test_command_line_arguments_defaults[classes-expected_default1].

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2215610003

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.141%

Totals Coverage Status
Change from base Build 2212823730: 0.0%
Covered Lines: 15741
Relevant Lines: 16545

💛 - Coveralls

@DanielNoord DanielNoord added this to the 2.14.0 milestone Apr 24, 2022
@DanielNoord
Copy link
Collaborator

Thanks @DudeNr33!

@DudeNr33 DudeNr33 merged commit bfd1042 into pylint-dev:main Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants