Skip to content

Conversation

JonnyWong16
Copy link
Collaborator

@JonnyWong16 JonnyWong16 commented May 30, 2021

Description

The current reload behaviour prevents overwriting attributes with None. This change allows overwriting attributes with None when calling a manual reload(), but still prevents overwriting when we do the automatic internal reload when accessing a missing attribute.

Other changes:

TODO: Tests can be updated after rebasing on #763 and #764 which ran into this reloading issue.

Fixes #770

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable

@JonnyWong16 JonnyWong16 merged commit b943bc6 into pushingkarmaorg:master Jun 7, 2021
@JonnyWong16 JonnyWong16 deleted the feature/auto_reload branch June 7, 2021 02:49
if attr in DONT_OVERWRITE_SESSION_KEYS: return value
if attr in _DONT_RELOAD_FOR_KEYS: return value
if attr in _DONT_OVERWRITE_SESSION_KEYS: return value
if attr in USER_DONT_RELOAD_FOR_KEYS: return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you not return value here on purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I forgot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants