You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
In (some) @property functions, the access to other properties of the class are not detected as reasons for impurity.
Examples:
# seaborn_v0.12.2.external.version.is_devrelease.334.4@propertydefis_devrelease(self) ->bool:
returnself.devisnotNone# Impure Read from property dev is not detected
# pandas_v2.0.3.core.arrays.sparse.array.nbytes.667.4@propertydefnbytes(self) ->int:
returnself.sp_values.nbytes+self.sp_index.nbytes# Impure Read from property sp_values and sp_index is not detected
To Reproduce
Run purity analysis on the libraries
Check the result file
Expected behavior
Access of propertys are impure and therefore must be detected as impure.
Therefore a special case needs to be implemented to deal with that.
Screenshots (optional)
No response
Additional Context (optional)
Since the tests were only done for a sample of functions, there could be more functions with the same problem.
The text was updated successfully, but these errors were encountered:
lukarade
changed the title
Missing 'NonLocalVariableRead' or NonLocalVariableWrite in @property functions
Missing NonLocalVariableRead and NonLocalVariableWrite in @property functions
Aug 30, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bug 🪲Something isn't workingpurityInferring the purity of functions
Describe the bug
In (some)
@property
functions, the access to other properties of the class are not detected as reasons for impurity.Examples:
To Reproduce
Expected behavior
Access of propertys are impure and therefore must be detected as impure.
Therefore a special case needs to be implemented to deal with that.
Screenshots (optional)
No response
Additional Context (optional)
Since the tests were only done for a sample of functions, there could be more functions with the same problem.
The text was updated successfully, but these errors were encountered: