What's the right way to call down into click.get_current_context ? #889
Answered
by
svlandeg
alexrosenfeld10
asked this question in
Questions
-
First Check
Commit to Help
Example Code# this gives me a warning because I've installed typer, not click
from click import get_current_context
def my_thing_that_needs_context():
ctx = get_current_context() DescriptionIs this the right thing to do? Is there something inside typer that exposes the current context functionality, without having to go to click directly myself? Operating SystemmacOS Operating System DetailsNo response Typer Version0.12.3 Python Version3.12.3 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
svlandeg
Jul 26, 2024
Replies: 1 comment 1 reply
-
Hi!
I'm confused why you would get a warning here, as |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
svlandeg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I'm confused why you would get a warning here, as
click
is automatically installed whenevertyper
is installed. So the call toclick.get_current_context()
should just work.