Skip to content

Remove three mixin nodes from #2171 #2231

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

Merged
merged 2 commits into from
Jul 2, 2023

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
🔨 Refactoring

Description

Follow-up to 082774a. The DRY benefits of these three mixins (NameNode, AssignNode, AttributeNode) were so minimal that they can just be repeated.

The OperatorNode mixin is pretty huge, so I opted to leave it for now. (The nodes that inherit from it don't have as complicated a series of multiple mixin parents as the nodes changed in this PR, so it's not doing much harm.)

@jacobtylerwalls jacobtylerwalls added pylint-tested PRs that don't cause major regressions with pylint Maintenance Discussion or action around maintaining astroid or the dev workflow Unreleased labels Jul 2, 2023
@jacobtylerwalls jacobtylerwalls added this to the 3.0.0a6 milestone Jul 2, 2023
@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #2231 (40c15b4) into main (7c90b58) will decrease coverage by 0.06%.
The diff coverage is 92.18%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2231      +/-   ##
==========================================
- Coverage   92.93%   92.88%   -0.06%     
==========================================
  Files          94       94              
  Lines       10926    10928       +2     
==========================================
- Hits        10154    10150       -4     
- Misses        772      778       +6     
Flag Coverage Δ
linux 92.63% <92.18%> (-0.06%) ⬇️
pypy 90.99% <90.62%> (-0.04%) ⬇️
windows 92.46% <92.18%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
astroid/__init__.py 100.00% <ø> (ø)
astroid/nodes/node_classes.py 94.78% <91.93%> (-0.13%) ⬇️
astroid/nodes/_base_nodes.py 96.88% <100.00%> (-0.19%) ⬇️

... and 1 file with indirect coverage changes

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
@jacobtylerwalls jacobtylerwalls enabled auto-merge (squash) July 2, 2023 14:50
@jacobtylerwalls jacobtylerwalls disabled auto-merge July 2, 2023 17:40
@jacobtylerwalls jacobtylerwalls merged commit 65df5e8 into pylint-dev:main Jul 2, 2023
@jacobtylerwalls jacobtylerwalls deleted the remove-mixins branch July 2, 2023 17:41
Comment on lines -1045 to -1048
def infer_lhs(
self, context: InferenceContext | None = None, **kwargs: Any
) -> Generator[InferenceResult, None, InferenceErrorInfo | None]:
return self._infer_attribute(context, **kwargs)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the cause of pylint-dev/pylint#8823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining astroid or the dev workflow pylint-tested PRs that don't cause major regressions with pylint Unreleased
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants