You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More specifically, the issue isn't really with anything in main -- those method can do whatever makes the code there clear and simple since that code is completely isolated to that file.
The main complaint was that the Namespace object was then passed to the SessionContext constructor. This is not an idiomatic way of passing options and ties that API to an options object that has attributes for each option. A more idiomatic API would just use keyword arguments, and main could just pass in the arguments like this:
That would requires SessionContext to take **kwargs to handle any non-SessionContext related arguments; alternatively, we could filter down to the exact set we expect to be passed to SessionContext.
parse_args function in main.py returns a Namespace object.
Returning a dict/kwargs style object would make using parsed command-line arguments slightly simpler (and in MockArgs for unit tests for example).
The text was updated successfully, but these errors were encountered: