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
Extract the outermost function signature (the one with the Typer stuff) into a separate module, called cli.py
The function in that new module will call a function in refscan.py, whose signature is a stripped down version of the original one (i.e. no Typer stuff)
Update the pyproject.toml file to specify the main command as the one in cli.py
Considerations:
What to do with the existing print statements that were designed for CLI usage. Maybe have them rely on either (a) a function parameter that says whether we're in CLI mode or imported mode, or (b) a callback function that does the printing—which could be a noop when in imported mode
The text was updated successfully, but these errors were encountered:
Thoughts:
Typer
stuff) into a separate module, calledcli.py
refscan.py
, whose signature is a stripped down version of the original one (i.e. noTyper
stuff)pyproject.toml
file to specify the main command as the one incli.py
print
statements that were designed for CLI usage. Maybe have them rely on either (a) a function parameter that says whether we're in CLI mode or imported mode, or (b) a callback function that does the printing—which could be a noop when in imported modeThe text was updated successfully, but these errors were encountered: