Skip to content
This repository was archived by the owner on Oct 11, 2021. It is now read-only.

fix: protect members of StateTransitionGraph#479

Merged
redeboer merged 1 commit intomasterfrom
protect-STG-members
Feb 4, 2021
Merged

fix: protect members of StateTransitionGraph#479
redeboer merged 1 commit intomasterfrom
protect-STG-members

Conversation

@redeboer
Copy link
Copy Markdown
Member

@redeboer redeboer commented Feb 4, 2021

#460 decorated the StateTransitionGraph with attr.s and set its members to frozen. However, edge_props and node_props are dicts, meaning that you can still modify their values (and even their keys by using pop etc.). So, if we want the StateTransitionGraph to be truly frozen, their attributes can only be exposed if they are frozen themselves as well. See also #470.

Note: some additional checks have been added on the constructor of the STG.

@redeboer redeboer added the Bug Something isn't working label Feb 4, 2021
@redeboer redeboer self-assigned this Feb 4, 2021
@redeboer redeboer force-pushed the protect-STG-members branch from b56cfba to dc62014 Compare February 4, 2021 10:43
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 4, 2021

Codecov Report

Merging #479 (dc62014) into master (eb70bd7) will decrease coverage by 0.03%.
The diff coverage is 77.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
- Coverage   90.15%   90.11%   -0.04%     
==========================================
  Files          22       22              
  Lines        3270     3279       +9     
  Branches      828      827       -1     
==========================================
+ Hits         2948     2955       +7     
- Misses        166      168       +2     
  Partials      156      156              
Flag Coverage Δ
unittests 90.11% <77.41%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
src/expertsystem/reaction/topology.py 90.96% <77.41%> (-0.41%) ⬇️

@redeboer redeboer merged commit 5365213 into master Feb 4, 2021
@redeboer redeboer deleted the protect-STG-members branch February 4, 2021 10:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant