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
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
The POC phase left this codebase with all the logic inside the single cli.py file, as the features grow this should be broken up into individual modules for each command.
The main changes would be:
Move the remove the global data (watchlist / s) and replace with using contexts.
Instead of referencing this common data, just store and pass the arguments (or the parsed data?) as a context obj, which all the downstream modules would get. IE:
Per: https://typer.tiangolo.com/tutorial/commands/context/
The POC phase left this codebase with all the logic inside the single cli.py file, as the features grow this should be broken up into individual modules for each command.
The main changes would be:
Move the remove the global data (watchlist / s) and replace with using contexts.
Instead of referencing this common data, just store and pass the arguments (or the parsed data?) as a context obj, which all the downstream modules would get. IE:
Then the subcommand, which only has one command itself:
This doesn't make the subcommand stand alone, but would allow
main.py --foo=bar subcommand
to access foo in subcommand.py easily enough.The text was updated successfully, but these errors were encountered: