This repository was archived by the owner on Nov 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This file contains 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
…` dataclass instance
…ns in `_get_module_data`
# Conflicts: # src/library_analyzer/processing/api/__init__.py
…e extra ast traversal
# Conflicts: # src/library_analyzer/processing/api/__init__.py
…rator functions and dataclasses
The code coverage percentage for |
lars-reimann
suggested changes
Feb 27, 2024
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.
For the files in processing/api/purity_analysis
I've only done some spot checks. I currently don't have the time to review them completely.
tests/library_analyzer/processing/api/test_infer_purity_package.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/model/_reference.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/model/_reference.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/model/_reference.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/model/_reference.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/_build_call_graph.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/_get_module_data.py
Outdated
Show resolved
Hide resolved
src/library_analyzer/processing/api/purity_analysis/_get_module_data.py
Outdated
Show resolved
Hide resolved
…e refactoring, added `defaultset`, removed duplicate type hints, corrected typos)
lars-reimann
approved these changes
Feb 29, 2024
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.
Nice work!
This was referenced Apr 7, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary of Changes
In this fix, the data structure is reworked to fit the model discussed in the requirements.
Also, the analysis is changed regarding the resolving of references.
FunctionScope
class now holds target, value and call nodes for the function, so we can iterate over these for each function.It should now be more efficient and easier to understand since the changes to the data structures below were used.
Added the class
Reference
to represent a node that references aSymbol
. TheReferenceNode
class was extended with two subclassesTargetReference
- representing a Symbol referencing another Symbol, andValueReference
- representing a Reference referencing a Symbol. Both classes store the referenced symbols in a list.Reworked the
Reasons
class so it now holds the Symbols for the variables written to/ read from.This blocks the merge of #211!