refactor: Move ContainerExecutionStatus to enums module#202
refactor: Move ContainerExecutionStatus to enums module#202morgan-wowk wants to merge 1 commit intomasterfrom
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
|
||
| from . import api_server_sql | ||
| from . import backend_types_sql | ||
| from . import enums |
There was a problem hiding this comment.
nit: Would be better to be a bit descriptive for the name here like
- container_statuses
- models
- statuses
There was a problem hiding this comment.
Do you suggest a folder instead?
enums
\_container_statuses.py
There was a problem hiding this comment.
not a folder, just renaming the file. It's just that enums and enum (python's module) are so close, it's easy for my to confuse the two.
Mainly, it's probably good practice to describe the functionality of the file, not the technology. For example, if i named a file classes.py or functions.py, it'll be ambiguous.
There was a problem hiding this comment.
Thanks. Changed
Breaks the circular import that prevented event_listeners.py from typing StatusTransitionEvent fields as ContainerExecutionStatus. All consumers updated to import from the new enums module.
364adae to
fd0568a
Compare
|
>Breaks the circular import that prevented event_listeners.py from typing Hmm. Let's solve this.
|
|
From 1-1 discussion:
|
Thanks! That was a good dicussion. Cleaner solution coming soon! |

Breaks the circular import that prevented event_listeners.py from typing
StatusTransitionEvent fields as ContainerExecutionStatus. All consumers
updated to import from the new enums module.