Closed marcelotrevisani closed 4 years ago
What do you think @scopatz ?
Yeah, I think this is a good idea. We are getting a lot of config parameters. It would be better to pass around one object. (Maybe a dataclass even!)
Yeah, I think this is a good idea. We are getting a lot of config parameters. It would be better to pass around one object. (Maybe a dataclass even!)
Yes, that is a good idea indeed. However, dataclass
is available just for Python 3.7+
:(
True, do we need this to work on Python 3.6, though?
True, do we need this to work on Python 3.6, though?
I think we do not need it for Python 3.6. Should we go ahead and do this refactoring using dataclass
?
Yeah, I think so :wink:
By the way, I just saw that there is a project called dataclasses
which backport dataclass
to Python 3.6
Today I started to refactor the code, I might finish it tomorrow or late today. After that, I will develop the #36
Awesome! Thanks so much @marcelotrevisani!
It would be good to refactor the code to use a config parameter pattern (or maybe data class) instead of passing a lot of arguments as keywords to functions. it is interesting because it will simplify the code and we can do some processing before exposing the parameter if we want to.