-
-
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 all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
c555bf4
Correct the test output to follow UML semantics
Julfried 2f5bc4e
Introduce composition
Julfried 884ef49
Update all the printers to emit the right arrow types
Julfried d4804af
Update docstring
Julfried 3b84300
Remove type annotations from test output
Julfried 1899f46
Avoid processing duplicate relationships
Julfried 4b3eacd
Update expected files again -> defaults to association
Julfried 7dd8acb
change arrowhead for dot language for association relationsships
Julfried cbecf36
Update comment
Julfried 0a4488d
Update comments in test file
Julfried 376d1b5
rename test folders for better clarity
Julfried d3677ea
Enhance composition and aggregation handling in AST node processing sβ¦
Julfried bedf32f
Update relationship extraction to avoid duplicate entries
Julfried e6e0daf
Correctly infer the node type for Composition
Julfried 107f5a1
Update the functional test for comprehensions aswell
Julfried d62e8d5
Instead of checking not call node check for name node ==> more explicit
Julfried 431a977
Remove redundant checks in AggregationHandler
Julfried cc06341
Add todo note because infering type in Aggregation comprehensions is β¦
Julfried 3f108cf
Enhance type resolution in AssociationsHandler and add utility functiβ¦
Julfried 47ab016
Fix order so that tests pass
Julfried 4f92aff
Update the functional test files for attribute annotation, because noβ¦
Julfried b5222e5
Use the new utility function for the other handlers aswell
Julfried 54942be
Fix regression that did not correctly detect Composition in fields.py
Julfried 0068717
Revert functional test for comprehension ==> this now works with new β¦
Julfried 7dbfd7b
Add correct arrow type for dot printer
Julfried 5e2954c
Update functional tests to include all file formats
Julfried 2521686
Fix diadefs tests (DoNothing now is correctly detected as Compositionβ¦
Julfried 0cce815
Remove TODO since this now works
Julfried 148f2fb
Rename functional test files to relationships for better clarity
Julfried aa46267
rename to compositionshandler for better clarity
Julfried ba56957
Rename association-related classes to relationship aswell for improveβ¦
Julfried 5d4ab20
Try to fix the failing tests by processing instance attributes and clβ¦
Julfried d162fd0
Fix diadefs_test again (cls_member is now also correctly identified aβ¦
Julfried 72888e8
Also consider composition when when filtering for --no-standalone ==>β¦
Julfried d31c956
Add newsfragment
Julfried 2c46d17
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d1578a3
Add functional tests
Julfried 4e753d1
Update newsfragement
Julfried 04f4b2e
[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,4 @@ | ||
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 | ||
Closes #9267 |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.