-
Notifications
You must be signed in to change notification settings - Fork 18
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
RecursionError in LocalFileStorage #380
Comments
This is a pretty common code pattern and gives a bit of safeguarding in case you later change the internal code to not be resilient to external changes of this variable - I think the main issue here is bad testing and not necessarily maintenance burden! A PR containing the typo fix + test would be welcome 🙂 |
Sure, I suppose I am a fervent follower of YAGNI and think it's fairly easy to change an attribute to a managed property -- if anything, this kind of code encourages me to use the "private" attribute because the public one can't really be used -- but we all have different styles :-)
I think of needing to write and maintain additional tests as maintenance burden! |
openff-evaluator/openff/evaluator/storage/localfile.py
Lines 18 to 21 in 64d7440
This recursive call means the property is not really very helpful.
My suggestion would be to just not privatize attributes with getter/setters, as I think it adds burden to code maintenance and is liable to bugs such as the one reported here. (The actual attribute used is
_root_directory
.)The text was updated successfully, but these errors were encountered: