Skip to content

Instantly share code, notes, and snippets.

@DalyaG
Last active January 7, 2021 11:36
Show Gist options
  • Save DalyaG/bacef66eb89f52fa554c02eef682b3bb to your computer and use it in GitHub Desktop.
Save DalyaG/bacef66eb89f52fa554c02eef682b3bb to your computer and use it in GitHub Desktop.
from my_project_params import Params
class SomeMidProcessModule:
def __init__(self, params: Params = None):
self.params: Params = params or Params() # NO! BAD! if we don't input an instace of Params,
# we will create a new instance with only default values.
def run(self):
do_somaething(self.params.some_configurable_value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment