-
Notifications
You must be signed in to change notification settings - Fork 3
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
TP2000-1404: Reorganise measures and common code #1266
Conversation
@@ -0,0 +1,3 @@ | |||
from .base import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered importing every function explicitly but decided against it since it would just be a burden on devs making changes to those files in future having to remember to explicitly import new functions in here (I know I would definitely forget and then wonder why I'm getting an error)
@@ -0,0 +1,6 @@ | |||
from .base import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same again here. import *
in this particular context is more future-proof than importing everything explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems sensible!
Is this purely a reorganisation without any changes that could introduce side effects (there're a lot of changes making it difficult to see whether there are any)?
@paulpepper-trade Nope. No code changes. Just moving things around and adding the init imports |
* Split up common views * Split up measures views and forms code * Add imports to module __init__ files * Fix test * Remove empty files * Tidy up common views imports * Revert imports * Revert import * Revert comment * Fix import
TP2000-1404: Reorganise measures and common code
Why
What
__init__
files so we can still use the same import paths - measures.forms, measures.views, common.views