-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor pyreverse Association Logic #10397
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
Open
Julfried
wants to merge
39
commits into
pylint-dev:main
Choose a base branch
from
Julfried:fix-agg-comp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 36 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
6d4c487
Correct the test output to follow UML semantics
Julfried 54fd26b
Introduce composition
Julfried 19ae424
Update all the printers to emit the right arrow types
Julfried 9f48c87
Update docstring
Julfried a561cee
Remove type annotations from test output
Julfried b526764
Avoid processing duplicate relationships
Julfried d5938bf
Update expected files again -> defaults to association
Julfried ff9d93d
change arrowhead for dot language for association relationsships
Julfried ec949f2
Update comment
Julfried 74ebf7f
Update comments in test file
Julfried e7bd7ca
rename test folders for better clarity
Julfried 4216545
Enhance composition and aggregation handling in AST node processing sβ¦
Julfried 6ee8117
Update relationship extraction to avoid duplicate entries
Julfried 9677666
Correctly infer the node type for Composition
Julfried f3e7c23
Update the functional test for comprehensions aswell
Julfried 02e2024
Instead of checking not call node check for name node ==> more explicit
Julfried 2d157d8
Remove redundant checks in AggregationHandler
Julfried 195a6f7
Add todo note because infering type in Aggregation comprehensions is β¦
Julfried 31d93eb
Enhance type resolution in AssociationsHandler and add utility functiβ¦
Julfried 892c02e
Fix order so that tests pass
Julfried bc8b028
Update the functional test files for attribute annotation, because noβ¦
Julfried 36fe534
Use the new utility function for the other handlers aswell
Julfried 780740b
Fix regression that did not correctly detect Composition in fields.py
Julfried aef07ca
Revert functional test for comprehension ==> this now works with new β¦
Julfried 87d308f
Add correct arrow type for dot printer
Julfried 8f59271
Update functional tests to include all file formats
Julfried 4362e85
Fix diadefs tests (DoNothing now is correctly detected as Compositionβ¦
Julfried 6e35d4b
Remove TODO since this now works
Julfried d1fd43c
Rename functional test files to relationships for better clarity
Julfried c21e64c
rename to compositionshandler for better clarity
Julfried 5852435
Rename association-related classes to relationship aswell for improveβ¦
Julfried 70492f6
Try to fix the failing tests by processing instance attributes and clβ¦
Julfried f3f4364
Fix diadefs_test again (cls_member is now also correctly identified aβ¦
Julfried e62636f
Also consider composition when when filtering for --no-standalone ==>β¦
Julfried 9a3382f
Add newsfragment
Julfried 86c92e2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c727e14
Add functional tests
Julfried 07cda64
Update newsfragement
Julfried d275c2f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Enhanced pyreverse to properly distinguish between UML relationship types (association, aggregation, composition) based on object ownership semantics. Type annotations without assignment are now treated as associations, parameter assignments as aggregations, and object instantiation as compositions. | ||
|
||
Closes #9045 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you acccidentally fixed multiple issues, you can close more then one :D