Open hbmartin opened 16 hours ago
This pull request modifies the GraphObj.py
file to ignore the 'shape' attribute in graph object overrides, addressing issue #98. The change is implemented by adding 'shape' to the _blacklist_attrs
list.
No diagrams generated as the changes look simple and do not need a visual representation.
Change | Details | Files |
---|---|---|
Added 'shape' to the list of blacklisted attributes |
|
graphviz2drawio/mx/GraphObj.py |
The changes involve an update to the _blacklist_attrs
variable in the GraphObj
class located in GraphObj.py
. This variable has been modified to include an additional entry, "shape"
, alongside the existing entry, "fill"
. Consequently, the enrich_from_graph
method will now skip setting attributes for both "fill"
and "shape"
during its execution, making the attribute filtering process more restrictive.
File Path | Change Summary |
---|---|
graphviz2drawio/mx/GraphObj.py | Updated _blacklist_attrs from ["fill"] to ["fill", "shape"] |
In the garden where attributes play,
A rabbit hops in a joyful way.
With shapes and fills now on the run,
Enriching graphs is twice the fun!
🐇✨
graphviz2drawio/mx/GraphObj.py (1)
`1-1`: **LGTM! Change aligns with PR objective.** The addition of "shape" to `_blacklist_attrs` correctly implements the PR objective of ignoring shape in graph object override. This change will prevent the "shape" attribute from being set in the `enrich_from_graph` method. To ensure this change doesn't have unintended consequences, please verify that ignoring the "shape" attribute doesn't negatively impact any dependent functionality. Run the following script to check for any other usages of the "shape" attribute in the codebase:✅ Verification successful
**LGTM! The change correctly adds "shape" to `_blacklist_attrs` without impacting other parts of the codebase.** No unintended side effects detected from ignoring the "shape" attribute in `GraphObj.py`.🏁 Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for other usages of the "shape" attribute in the codebase # Search for "shape" attribute usage in Python files echo "Searching for 'shape' attribute usage:" rg --type python -i '\bshape\b' --context 2 ``` Length of output: 169 --- Script: ```shell #!/bin/bash # Description: Check for other usages of the "shape" attribute in Python files # Search for "shape" attribute usage in Python files echo "Searching for 'shape' attribute usage in Python files:" rg --ignore-case '\bshape\b' --context 2 --glob '*.py' ``` Length of output: 12262
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Summary by Sourcery
Fix the handling of attributes in the GraphObj class by adding 'shape' to the list of ignored attributes.
Bug Fixes:
Summary by CodeRabbit
New Features
Bug Fixes