index int64 0 50.7k | project_path stringclasses 279
values | completion_path stringlengths 57 199 | signature_postion stringlengths 3 11 | class_position stringlengths 3 11 | function_name stringlengths 1 62 | class_name stringlengths 0 55 | body_position stringlengths 3 11 | body_position_with_comments stringlengths 3 11 | masked_class stringlengths 14 8.32k | masked_class_with_comment stringlengths 14 8.32k | func_body stringlengths 9 6.72k | func_body_with_comment stringlengths 9 6.72k | len_func_body int64 1 643 | len_input int64 10 2.02k | len_output int64 4 1.9k | total int64 20 2.05k | file_code stringlengths 14 442k | file_code_with_comment stringlengths 14 442k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26,544 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/help/tutorial007.py | 8,24 | 1,40 | create | 27,30 | 24,30 | from typing import Union
import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: str = typer.Argument(..., help="The username to create"),
lastname: str = typer.Argument(
"", help="The last name of the new user", rich_help_panel="Secondary Arguments"
),
f... | from typing import Union
import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: str = typer.Argument(..., help="The username to create"),
lastname: str = typer.Argument(
"", help="The last name of the new user", rich_help_panel="Secondary Arguments"
),
f... | print(f"Creating user: {username}")
| """
[green]Create[/green] a new user. :sparkles:
"""
print(f"Creating user: {username}")
| 3 | 338 | 19 | 357 | from typing import Union
import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: str = typer.Argument(..., help="The username to create"),
lastname: str = typer.Argument(
"", help="The last name of the new user", rich_help_panel="Secondary Arguments"
),
f... | from typing import Union
import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: str = typer.Argument(..., help="The username to create"),
lastname: str = typer.Argument(
"", help="The last name of the new user", rich_help_panel="Secondary Arguments"
),
f... | |
26,545 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/help/tutorial007_an.py | 9,31 | 1,47 | create | 34,37 | 31,37 | from typing import Union
import typer
from typing_extensions import Annotated
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: Annotated[str, typer.Argument(help="The username to create")],
lastname: Annotated[
str,
typer.Argument(
help="The last na... | from typing import Union
import typer
from typing_extensions import Annotated
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: Annotated[str, typer.Argument(help="The username to create")],
lastname: Annotated[
str,
typer.Argument(
help="The last na... | print(f"Creating user: {username}")
| """
[green]Create[/green] a new user. :sparkles:
"""
print(f"Creating user: {username}")
| 3 | 382 | 19 | 401 | from typing import Union
import typer
from typing_extensions import Annotated
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: Annotated[str, typer.Argument(help="The username to create")],
lastname: Annotated[
str,
typer.Argument(
help="The last na... | from typing import Union
import typer
from typing_extensions import Annotated
app = typer.Typer(rich_markup_mode="rich")
@app.command()
def create(
username: Annotated[str, typer.Argument(help="The username to create")],
lastname: Annotated[
str,
typer.Argument(
help="The last na... | |
26,546 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/help/tutorial008.py | 6,8 | 1,16 | create | 11,14 | 8,14 | import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command(epilog="Made with :heart: in [blue]Venus[/blue]")
def create(username: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command(epilog="Made with :heart: in [blue]Venus[/blue]")
def create(username: str):
"""
[green]Create[/green] a new user. :sparkles:
"""
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(f"Creating user: {username}")
| """
[green]Create[/green] a new user. :sparkles:
"""
print(f"Creating user: {username}")
| 3 | 111 | 19 | 130 | import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command(epilog="Made with :heart: in [blue]Venus[/blue]")
def create(username: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(rich_markup_mode="rich")
@app.command(epilog="Made with :heart: in [blue]Venus[/blue]")
def create(username: str):
"""
[green]Create[/green] a new user. :sparkles:
"""
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,547 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/index/tutorial001.py | 6,8 | 1,13 | main | 8,11 | 8,11 | import typer
app = typer.Typer()
@app.command()
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 55 | 16 | 71 | import typer
app = typer.Typer()
@app.command()
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,548 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/index/tutorial002.py | 6,8 | 1,18 | create | 8,11 | 8,11 | import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.command()
def delete():
print("Deleting user: Hiro Hamada")
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.command()
def delete():
print("Deleting user: Hiro Hamada")
if __name__ == "__main__":
app()
| print("Creating user: Hiro Hamada")
| print("Creating user: Hiro Hamada")
| 4 | 77 | 18 | 95 | import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.command()
def delete():
print("Deleting user: Hiro Hamada")
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.command()
def delete():
print("Deleting user: Hiro Hamada")
if __name__ == "__main__":
app()
| |
26,549 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/index/tutorial003.py | 11,13 | 1,18 | delete | 13,16 | 13,16 | import typer
app = typer.Typer(no_args_is_help=True)
@app.command()
def create():
print("Creating user: Hiro Hamada")
@app.command()
def delete():
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(no_args_is_help=True)
@app.command()
def create():
print("Creating user: Hiro Hamada")
@app.command()
def delete():
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print("Deleting user: Hiro Hamada")
| print("Deleting user: Hiro Hamada")
| 4 | 86 | 19 | 105 | import typer
app = typer.Typer(no_args_is_help=True)
@app.command()
def create():
print("Creating user: Hiro Hamada")
@app.command()
def delete():
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(no_args_is_help=True)
@app.command()
def create():
print("Creating user: Hiro Hamada")
@app.command()
def delete():
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,550 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/name/tutorial001.py | 6,8 | 1,18 | cli_create_user | 8,11 | 8,11 | import typer
app = typer.Typer()
@app.command("create")
def cli_create_user(username: str):
FILL_FUNC_BODY@app.command("delete")
def cli_delete_user(username: str):
print(f"Deleting user: {username}")
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command("create")
def cli_create_user(username: str):
FILL_FUNC_BODY@app.command("delete")
def cli_delete_user(username: str):
print(f"Deleting user: {username}")
if __name__ == "__main__":
app()
| print(f"Creating user: {username}")
| print(f"Creating user: {username}")
| 3 | 100 | 19 | 119 | import typer
app = typer.Typer()
@app.command("create")
def cli_create_user(username: str):
FILL_FUNC_BODY@app.command("delete")
def cli_delete_user(username: str):
print(f"Deleting user: {username}")
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command("create")
def cli_create_user(username: str):
FILL_FUNC_BODY@app.command("delete")
def cli_delete_user(username: str):
print(f"Deleting user: {username}")
if __name__ == "__main__":
app()
| |
26,551 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/one_or_multiple/tutorial001.py | 6,8 | 1,18 | create | 8,11 | 8,11 | import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
pass
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
pass
if __name__ == "__main__":
app()
| print("Creating user: Hiro Hamada")
| print("Creating user: Hiro Hamada")
| 4 | 66 | 18 | 84 | import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
pass
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
pass
if __name__ == "__main__":
app()
| |
26,552 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/one_or_multiple/tutorial002.py | 6,8 | 1,22 | create | 8,11 | 8,11 | import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
"""
Creates a single user Hiro Hamada.
In the next version it will create 5 users more.
"""
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
"""
Creates a single user Hiro Hamada.
In the next version it will create 5 users more.
"""
if __name__ == "__main__":
app()
| print("Creating user: Hiro Hamada")
| print("Creating user: Hiro Hamada")
| 4 | 96 | 18 | 114 | import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
"""
Creates a single user Hiro Hamada.
In the next version it will create 5 users more.
"""
if __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def create():
FILL_FUNC_BODY@app.callback()
def callback():
"""
Creates a single user Hiro Hamada.
In the next version it will create 5 users more.
"""
if __name__ == "__main__":
app()
| |
26,553 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/options/tutorial001.py | 22,28 | 1,41 | delete_all | 28,34 | 28,34 | import typer
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: bool = typer.Option(..., prompt="Are you sure you want to delete the user?"),
):
if force:
print(f"Deleting user: {username}")
... | import typer
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: bool = typer.Option(..., prompt="Are you sure you want to delete the user?"),
):
if force:
print(f"Deleting user: {username}")
... | if force:
print("Deleting all users")
else:
print("Operation cancelled")
| if force:
print("Deleting all users")
else:
print("Operation cancelled")
| 8 | 216 | 35 | 251 | import typer
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: bool = typer.Option(..., prompt="Are you sure you want to delete the user?"),
):
if force:
print(f"Deleting user: {username}")
... | import typer
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: bool = typer.Option(..., prompt="Are you sure you want to delete the user?"),
):
if force:
print(f"Deleting user: {username}")
... | |
26,554 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/commands/options/tutorial001_an.py | 25,31 | 1,44 | delete_all | 31,37 | 31,37 | import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: Annotated[
bool, typer.Option(prompt="Are you sure you want to delete the user?")
],
):
... | import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: Annotated[
bool, typer.Option(prompt="Are you sure you want to delete the user?")
],
):
... | if force:
print("Deleting all users")
else:
print("Operation cancelled")
| if force:
print("Deleting all users")
else:
print("Operation cancelled")
| 8 | 237 | 35 | 272 | import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: Annotated[
bool, typer.Option(prompt="Are you sure you want to delete the user?")
],
):
... | import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def create(username: str):
print(f"Creating user: {username}")
@app.command()
def delete(
username: str,
force: Annotated[
bool, typer.Option(prompt="Are you sure you want to delete the user?")
],
):
... | |
26,555 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/exceptions/tutorial001.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(name + 3)
| print(name + 3)
| 3 | 50 | 13 | 63 | import typer
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,556 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/exceptions/tutorial002.py | 6,8 | 1,13 | main | 8,11 | 8,11 | import typer
app = typer.Typer(pretty_exceptions_show_locals=False)
@app.command()
def main(password: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(pretty_exceptions_show_locals=False)
@app.command()
def main(password: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(password + 3)
| print(password + 3)
| 3 | 67 | 13 | 80 | import typer
app = typer.Typer(pretty_exceptions_show_locals=False)
@app.command()
def main(password: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(pretty_exceptions_show_locals=False)
@app.command()
def main(password: str):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,557 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/exceptions/tutorial003.py | 6,8 | 1,13 | main | 8,11 | 8,11 | import typer
app = typer.Typer(pretty_exceptions_short=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(pretty_exceptions_short=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(name + 3)
| print(name + 3)
| 3 | 70 | 13 | 83 | import typer
app = typer.Typer(pretty_exceptions_short=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(pretty_exceptions_short=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,558 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/exceptions/tutorial004.py | 6,8 | 1,13 | main | 8,11 | 8,11 | import typer
app = typer.Typer(pretty_exceptions_enable=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(pretty_exceptions_enable=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(name + 3)
| print(name + 3)
| 3 | 70 | 13 | 83 | import typer
app = typer.Typer(pretty_exceptions_enable=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer(pretty_exceptions_enable=False)
@app.command()
def main(name: str = "morty"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,559 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/first_steps/tutorial001.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print("Hello World")
| print("Hello World")
| 2 | 40 | 12 | 52 | import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,560 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/first_steps/tutorial002.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 44 | 16 | 60 | import typer
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,561 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/first_steps/tutorial003.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(name: str, lastname: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 49 | 20 | 69 | import typer
def main(name: str, lastname: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,562 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/first_steps/tutorial004.py | 4,5 | 1,13 | main | 5,11 | 5,11 | import typer
def main(name: str, lastname: str, formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str, formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 55 | 50 | 105 | import typer
def main(name: str, lastname: str, formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str, formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,563 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/first_steps/tutorial005.py | 4,5 | 1,13 | main | 5,11 | 5,11 | import typer
def main(name: str, lastname: str = "", formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = "", formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 56 | 50 | 106 | import typer
def main(name: str, lastname: str = "", formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = "", formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,564 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/first_steps/tutorial006.py | 4,5 | 1,18 | main | 10,16 | 5,16 | import typer
def main(name: str, lastname: str = "", formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = "", formal: bool = False):
"""
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| """
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 92 | 50 | 142 | import typer
def main(name: str, lastname: str = "", formal: bool = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = "", formal: bool = False):
"""
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,565 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/launch/tutorial001.py | 4,5 | 1,11 | main | 5,9 | 5,9 | import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print("Opening Typer's docs")
typer.launch("https://typer.tiangolo.com")
| print("Opening Typer's docs")
typer.launch("https://typer.tiangolo.com")
| 4 | 40 | 37 | 77 | import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,566 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/launch/tutorial002.py | 8,9 | 1,22 | main | 9,20 | 9,20 | from pathlib import Path
import typer
APP_NAME = "my-super-cli-app"
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from pathlib import Path
import typer
APP_NAME = "my-super-cli-app"
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| app_dir = typer.get_app_dir(APP_NAME)
app_dir_path = Path(app_dir)
app_dir_path.mkdir(parents=True, exist_ok=True)
config_path: Path = Path(app_dir) / "config.json"
if not config_path.is_file():
config_path.write_text('{"version": "1.0.0"}')
config_file_str = str(config_path)
print("... | app_dir = typer.get_app_dir(APP_NAME)
app_dir_path = Path(app_dir)
app_dir_path.mkdir(parents=True, exist_ok=True)
config_path: Path = Path(app_dir) / "config.json"
if not config_path.is_file():
config_path.write_text('{"version": "1.0.0"}')
config_file_str = str(config_path)
print("... | 27 | 62 | 160 | 222 | from pathlib import Path
import typer
APP_NAME = "my-super-cli-app"
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from pathlib import Path
import typer
APP_NAME = "my-super-cli-app"
def main():
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,567 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial001.py | 7,8 | 1,16 | main | 8,14 | 8,14 | from pathlib import Path
from typing import List
import typer
def main(files: List[Path], celebration: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from pathlib import Path
from typing import List
import typer
def main(files: List[Path], celebration: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| for path in files:
if path.is_file():
print(f"This file exists: {path.name}")
print(celebration)
| for path in files:
if path.is_file():
print(f"This file exists: {path.name}")
print(celebration)
| 11 | 62 | 49 | 111 | from pathlib import Path
from typing import List
import typer
def main(files: List[Path], celebration: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from pathlib import Path
from typing import List
import typer
def main(files: List[Path], celebration: str):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,568 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002.py | 6,11 | 1,17 | main | 11,15 | 11,15 | from typing import Tuple
import typer
def main(
names: Tuple[str, str, str] = typer.Argument(
("Harry", "Hermione", "Ron"), help="Select 3 characters to play with"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
def main(
names: Tuple[str, str, str] = typer.Argument(
("Harry", "Hermione", "Ron"), help="Select 3 characters to play with"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| for name in names:
print(f"Hello {name}")
| for name in names:
print(f"Hello {name}")
| 6 | 97 | 24 | 121 | from typing import Tuple
import typer
def main(
names: Tuple[str, str, str] = typer.Argument(
("Harry", "Hermione", "Ron"), help="Select 3 characters to play with"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
def main(
names: Tuple[str, str, str] = typer.Argument(
("Harry", "Hermione", "Ron"), help="Select 3 characters to play with"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,569 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002_an.py | 7,12 | 1,18 | main | 12,16 | 12,16 | from typing import Tuple
import typer
from typing_extensions import Annotated
def main(
names: Annotated[
Tuple[str, str, str], typer.Argument(help="Select 3 characters to play with")
] = ("Harry", "Hermione", "Ron"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
from typing_extensions import Annotated
def main(
names: Annotated[
Tuple[str, str, str], typer.Argument(help="Select 3 characters to play with")
] = ("Harry", "Hermione", "Ron"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| for name in names:
print(f"Hello {name}")
| for name in names:
print(f"Hello {name}")
| 6 | 110 | 24 | 134 | from typing import Tuple
import typer
from typing_extensions import Annotated
def main(
names: Annotated[
Tuple[str, str, str], typer.Argument(help="Select 3 characters to play with")
] = ("Harry", "Hermione", "Ron"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
from typing_extensions import Annotated
def main(
names: Annotated[
Tuple[str, str, str], typer.Argument(help="Select 3 characters to play with")
] = ("Harry", "Hermione", "Ron"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,570 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/multiple_options/tutorial001.py | 6,7 | 1,16 | main | 7,14 | 7,14 | from typing import List, Optional
import typer
def main(user: Optional[List[str]] = typer.Option(None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List, Optional
import typer
def main(user: Optional[List[str]] = typer.Option(None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if not user:
print(f"No provided users (raw input = {user})")
raise typer.Abort()
for u in user:
print(f"Processing user: {u}")
| if not user:
print(f"No provided users (raw input = {user})")
raise typer.Abort()
for u in user:
print(f"Processing user: {u}")
| 19 | 65 | 62 | 127 | from typing import List, Optional
import typer
def main(user: Optional[List[str]] = typer.Option(None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List, Optional
import typer
def main(user: Optional[List[str]] = typer.Option(None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,571 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/multiple_options/tutorial001_an.py | 7,8 | 1,17 | main | 8,15 | 8,15 | from typing import List, Optional
import typer
from typing_extensions import Annotated
def main(user: Annotated[Optional[List[str]], typer.Option()] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List, Optional
import typer
from typing_extensions import Annotated
def main(user: Annotated[Optional[List[str]], typer.Option()] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if not user:
print(f"No provided users (raw input = {user})")
raise typer.Abort()
for u in user:
print(f"Processing user: {u}")
| if not user:
print(f"No provided users (raw input = {user})")
raise typer.Abort()
for u in user:
print(f"Processing user: {u}")
| 19 | 79 | 62 | 141 | from typing import List, Optional
import typer
from typing_extensions import Annotated
def main(user: Annotated[Optional[List[str]], typer.Option()] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List, Optional
import typer
from typing_extensions import Annotated
def main(user: Annotated[Optional[List[str]], typer.Option()] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,572 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/multiple_options/tutorial002.py | 6,7 | 1,12 | main | 7,10 | 7,10 | from typing import List
import typer
def main(number: List[float] = typer.Option([])):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List
import typer
def main(number: List[float] = typer.Option([])):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"The sum is {sum(number)}")
| print(f"The sum is {sum(number)}")
| 4 | 61 | 20 | 81 | from typing import List
import typer
def main(number: List[float] = typer.Option([])):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List
import typer
def main(number: List[float] = typer.Option([])):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,573 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/multiple_options/tutorial002_an.py | 7,8 | 1,13 | main | 8,11 | 8,11 | from typing import List
import typer
from typing_extensions import Annotated
def main(number: Annotated[List[float], typer.Option()] = []):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List
import typer
from typing_extensions import Annotated
def main(number: Annotated[List[float], typer.Option()] = []):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"The sum is {sum(number)}")
| print(f"The sum is {sum(number)}")
| 4 | 74 | 20 | 94 | from typing import List
import typer
from typing_extensions import Annotated
def main(number: Annotated[List[float], typer.Option()] = []):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import List
import typer
from typing_extensions import Annotated
def main(number: Annotated[List[float], typer.Option()] = []):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,574 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001.py | 6,7 | 1,18 | main | 7,16 | 7,16 | from typing import Tuple
import typer
def main(user: Tuple[str, int, bool] = typer.Option((None, None, None))):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
def main(user: Tuple[str, int, bool] = typer.Option((None, None, None))):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| username, coins, is_wizard = user
if not username:
print("No user provided")
raise typer.Abort()
print(f"The username {username} has {coins} coins")
if is_wizard:
print("And this user is a wizard!")
| username, coins, is_wizard = user
if not username:
print("No user provided")
raise typer.Abort()
print(f"The username {username} has {coins} coins")
if is_wizard:
print("And this user is a wizard!")
| 27 | 71 | 85 | 156 | from typing import Tuple
import typer
def main(user: Tuple[str, int, bool] = typer.Option((None, None, None))):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
def main(user: Tuple[str, int, bool] = typer.Option((None, None, None))):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,575 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001_an.py | 7,8 | 1,19 | main | 8,17 | 8,17 | from typing import Tuple
import typer
from typing_extensions import Annotated
def main(user: Annotated[Tuple[str, int, bool], typer.Option()] = (None, None, None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
from typing_extensions import Annotated
def main(user: Annotated[Tuple[str, int, bool], typer.Option()] = (None, None, None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| username, coins, is_wizard = user
if not username:
print("No user provided")
raise typer.Abort()
print(f"The username {username} has {coins} coins")
if is_wizard:
print("And this user is a wizard!")
| username, coins, is_wizard = user
if not username:
print("No user provided")
raise typer.Abort()
print(f"The username {username} has {coins} coins")
if is_wizard:
print("And this user is a wizard!")
| 27 | 86 | 85 | 171 | from typing import Tuple
import typer
from typing_extensions import Annotated
def main(user: Annotated[Tuple[str, int, bool], typer.Option()] = (None, None, None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Tuple
import typer
from typing_extensions import Annotated
def main(user: Annotated[Tuple[str, int, bool], typer.Option()] = (None, None, None)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,576 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial001.py | 6,7 | 1,18 | name_callback | 7,12 | 7,12 | from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 11 | 92 | 36 | 128 | from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| |
26,577 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial001_an.py | 13,14 | 1,19 | main | 14,17 | 14,17 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
FILL_FUNC_BODY... | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
FILL_FUNC_BODY... | print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 120 | 16 | 136 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
FILL_FUNC_BODY... | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
FILL_FUNC_BODY... | |
26,578 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial002.py | 6,7 | 1,19 | name_callback | 7,13 | 7,13 | from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 13 | 92 | 45 | 137 | from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| |
26,579 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial002_an.py | 7,8 | 1,20 | name_callback | 8,14 | 8,14 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 13 | 102 | 45 | 147 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| |
26,580 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial003.py | 6,7 | 1,21 | name_callback | 7,15 | 7,15 | from typing import Optional
import typer
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| if ctx.resilient_parsing:
return
print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| if ctx.resilient_parsing:
return
print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 16 | 99 | 62 | 161 | from typing import Optional
import typer
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| |
26,581 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial003_an.py | 7,8 | 1,22 | name_callback | 8,16 | 8,16 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| if ctx.resilient_parsing:
return
print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| if ctx.resilient_parsing:
return
print("Validating name")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 16 | 109 | 62 | 171 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| |
26,582 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial004.py | 6,7 | 1,21 | name_callback | 7,15 | 7,15 | from typing import Optional
import typer
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| if ctx.resilient_parsing:
return
print(f"Validating param: {param.name}")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| if ctx.resilient_parsing:
return
print(f"Validating param: {param.name}")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 17 | 107 | 70 | 177 | from typing import Optional
import typer
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Optional[str] = typer.Option(default=None, callback=name_callback)):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
| |
26,583 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/callback/tutorial004_an.py | 7,8 | 1,22 | name_callback | 8,16 | 8,16 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
... | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
... | if ctx.resilient_parsing:
return
print(f"Validating param: {param.name}")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| if ctx.resilient_parsing:
return
print(f"Validating param: {param.name}")
if value != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return value
| 17 | 117 | 70 | 187 | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
... | from typing import Optional
import typer
from typing_extensions import Annotated
def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str):
FILL_FUNC_BODYdef main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None):
print(f"Hello {name}")
if __name__ == "__main__":
... | |
26,584 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial001.py | 4,9 | 1,22 | main | 14,20 | 9,20 | import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(False, help="Say hi formally."),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(False, help="Say hi formally."),
):
"""
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
FILL_FUNC_BODYif __nam... | if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| """
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 129 | 50 | 179 | import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(False, help="Say hi formally."),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(False, help="Say hi formally."),
):
"""
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
FILL_FUNC_BODYif __nam... | |
26,585 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial001_an.py | 5,10 | 1,23 | main | 15,21 | 10,21 | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[bool, typer.Option(help="Say hi formally.")] = False,
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[bool, typer.Option(help="Say hi formally.")] = False,
):
"""
Say hi to NAME, optionally with a --lastname.
If --formal... | if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| """
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 148 | 50 | 198 | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[bool, typer.Option(help="Say hi formally.")] = False,
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[bool, typer.Option(help="Say hi formally.")] = False,
):
"""
Say hi to NAME, optionally with a --lastname.
If --formal... | |
26,586 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial002.py | 4,14 | 1,27 | main | 19,25 | 14,25 | import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(
False, help="Say hi formally.", rich_help_panel="Customization and Utils"
),
debug: bool = typer.Option(
False, help="Enable debugging.", rich_help... | import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(
False, help="Say hi formally.", rich_help_panel="Customization and Utils"
),
debug: bool = typer.Option(
False, help="Enable debugging.", rich_help... | if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| """
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 184 | 50 | 234 | import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(
False, help="Say hi formally.", rich_help_panel="Customization and Utils"
),
debug: bool = typer.Option(
False, help="Enable debugging.", rich_help... | import typer
def main(
name: str,
lastname: str = typer.Option("", help="Last name of person to greet."),
formal: bool = typer.Option(
False, help="Say hi formally.", rich_help_panel="Customization and Utils"
),
debug: bool = typer.Option(
False, help="Enable debugging.", rich_help... | |
26,587 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial002_an.py | 5,21 | 1,34 | main | 26,32 | 21,32 | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[
bool,
typer.Option(
help="Say hi formally.", rich_help_panel="Customization and Utils"
),
... | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[
bool,
typer.Option(
help="Say hi formally.", rich_help_panel="Customization and Utils"
),
... | if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| """
Say hi to NAME, optionally with a --lastname.
If --formal is used, say hi very formally.
"""
if formal:
print(f"Good day Ms. {name} {lastname}.")
else:
print(f"Hello {name} {lastname}")
| 11 | 222 | 50 | 272 | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[
bool,
typer.Option(
help="Say hi formally.", rich_help_panel="Customization and Utils"
),
... | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "",
formal: Annotated[
bool,
typer.Option(
help="Say hi formally.", rich_help_panel="Customization and Utils"
),
... | |
26,588 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial003.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(fullname: str = typer.Option("Wade Wilson", show_default=False)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(fullname: str = typer.Option("Wade Wilson", show_default=False)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {fullname}")
| print(f"Hello {fullname}")
| 2 | 61 | 17 | 78 | import typer
def main(fullname: str = typer.Option("Wade Wilson", show_default=False)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(fullname: str = typer.Option("Wade Wilson", show_default=False)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,589 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial003_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(fullname: Annotated[str, typer.Option(show_default=False)] = "Wade Wilson"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(fullname: Annotated[str, typer.Option(show_default=False)] = "Wade Wilson"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {fullname}")
| print(f"Hello {fullname}")
| 2 | 76 | 17 | 93 | import typer
from typing_extensions import Annotated
def main(fullname: Annotated[str, typer.Option(show_default=False)] = "Wade Wilson"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(fullname: Annotated[str, typer.Option(show_default=False)] = "Wade Wilson"):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,590 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial004.py | 4,9 | 1,14 | main | 9,12 | 9,12 | import typer
def main(
fullname: str = typer.Option(
"Wade Wilson", show_default="Deadpoolio the amazing's name"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
fullname: str = typer.Option(
"Wade Wilson", show_default="Deadpoolio the amazing's name"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {fullname}")
| print(f"Hello {fullname}")
| 2 | 79 | 17 | 96 | import typer
def main(
fullname: str = typer.Option(
"Wade Wilson", show_default="Deadpoolio the amazing's name"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
fullname: str = typer.Option(
"Wade Wilson", show_default="Deadpoolio the amazing's name"
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,591 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/help/tutorial004_an.py | 5,10 | 1,15 | main | 10,13 | 10,13 | import typer
from typing_extensions import Annotated
def main(
fullname: Annotated[
str, typer.Option(show_default="Deadpoolio the amazing's name")
] = "Wade Wilson",
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
fullname: Annotated[
str, typer.Option(show_default="Deadpoolio the amazing's name")
] = "Wade Wilson",
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {fullname}")
| print(f"Hello {fullname}")
| 2 | 93 | 17 | 110 | import typer
from typing_extensions import Annotated
def main(
fullname: Annotated[
str, typer.Option(show_default="Deadpoolio the amazing's name")
] = "Wade Wilson",
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
fullname: Annotated[
str, typer.Option(show_default="Deadpoolio the amazing's name")
] = "Wade Wilson",
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,592 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial001.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(user_name: str = typer.Option(..., "--name")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "--name")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 58 | 18 | 76 | import typer
def main(user_name: str = typer.Option(..., "--name")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "--name")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,593 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial001_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 68 | 18 | 86 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,594 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial002.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(user_name: str = typer.Option(..., "--name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "--name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 61 | 18 | 79 | import typer
def main(user_name: str = typer.Option(..., "--name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "--name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,595 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial002_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 71 | 18 | 89 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,596 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial003.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(user_name: str = typer.Option(..., "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 57 | 18 | 75 | import typer
def main(user_name: str = typer.Option(..., "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,597 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial003_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 68 | 18 | 86 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,598 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial004.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(user_name: str = typer.Option(..., "--user-name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "--user-name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 63 | 18 | 81 | import typer
def main(user_name: str = typer.Option(..., "--user-name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(user_name: str = typer.Option(..., "--user-name", "-n")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,599 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial004_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--user-name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--user-name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {user_name}")
| print(f"Hello {user_name}")
| 2 | 73 | 18 | 91 | import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--user-name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(user_name: Annotated[str, typer.Option("--user-name", "-n")]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,600 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial005.py | 4,8 | 1,16 | main | 8,14 | 8,14 | import typer
def main(
name: str = typer.Option(..., "--name", "-n"),
formal: bool = typer.Option(False, "--formal", "-f"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str = typer.Option(..., "--name", "-n"),
formal: bool = typer.Option(False, "--formal", "-f"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if formal:
print(f"Good day Ms. {name}.")
else:
print(f"Hello {name}")
| if formal:
print(f"Good day Ms. {name}.")
else:
print(f"Hello {name}")
| 9 | 83 | 42 | 125 | import typer
def main(
name: str = typer.Option(..., "--name", "-n"),
formal: bool = typer.Option(False, "--formal", "-f"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str = typer.Option(..., "--name", "-n"),
formal: bool = typer.Option(False, "--formal", "-f"),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,601 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/name/tutorial005_an.py | 5,9 | 1,17 | main | 9,15 | 9,15 | import typer
from typing_extensions import Annotated
def main(
name: Annotated[str, typer.Option("--name", "-n")],
formal: Annotated[bool, typer.Option("--formal", "-f")] = False,
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: Annotated[str, typer.Option("--name", "-n")],
formal: Annotated[bool, typer.Option("--formal", "-f")] = False,
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if formal:
print(f"Good day Ms. {name}.")
else:
print(f"Hello {name}")
| if formal:
print(f"Good day Ms. {name}.")
else:
print(f"Hello {name}")
| 9 | 98 | 42 | 140 | import typer
from typing_extensions import Annotated
def main(
name: Annotated[str, typer.Option("--name", "-n")],
formal: Annotated[bool, typer.Option("--formal", "-f")] = False,
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: Annotated[str, typer.Option("--name", "-n")],
formal: Annotated[bool, typer.Option("--formal", "-f")] = False,
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,602 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/password/tutorial001.py | 4,7 | 1,12 | main | 7,10 | 7,10 | import typer
def main(
name: str, email: str = typer.Option(..., prompt=True, confirmation_prompt=True)
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str, email: str = typer.Option(..., prompt=True, confirmation_prompt=True)
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name}, your email is {email}")
| print(f"Hello {name}, your email is {email}")
| 6 | 70 | 22 | 92 | import typer
def main(
name: str, email: str = typer.Option(..., prompt=True, confirmation_prompt=True)
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str, email: str = typer.Option(..., prompt=True, confirmation_prompt=True)
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,603 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/password/tutorial001_an.py | 5,9 | 1,14 | main | 9,12 | 9,12 | import typer
from typing_extensions import Annotated
def main(
name: str,
email: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
email: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name}, your email is {email}")
| print(f"Hello {name}, your email is {email}")
| 6 | 85 | 22 | 107 | import typer
from typing_extensions import Annotated
def main(
name: str,
email: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
email: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,604 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/password/tutorial002.py | 4,10 | 1,16 | main | 10,14 | 10,14 | import typer
def main(
name: str,
password: str = typer.Option(
..., prompt=True, confirmation_prompt=True, hide_input=True
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str,
password: str = typer.Option(
..., prompt=True, confirmation_prompt=True, hide_input=True
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name}. Doing something very secure with password.")
print(f"...just kidding, here it is, very insecure: {password}")
| print(f"Hello {name}. Doing something very secure with password.")
print(f"...just kidding, here it is, very insecure: {password}")
| 16 | 82 | 47 | 129 | import typer
def main(
name: str,
password: str = typer.Option(
..., prompt=True, confirmation_prompt=True, hide_input=True
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str,
password: str = typer.Option(
..., prompt=True, confirmation_prompt=True, hide_input=True
),
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,605 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/password/tutorial002_an.py | 5,11 | 1,17 | main | 11,15 | 11,15 | import typer
from typing_extensions import Annotated
def main(
name: str,
password: Annotated[
str, typer.Option(prompt=True, confirmation_prompt=True, hide_input=True)
],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
password: Annotated[
str, typer.Option(prompt=True, confirmation_prompt=True, hide_input=True)
],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name}. Doing something very secure with password.")
print(f"...just kidding, here it is, very insecure: {password}")
| print(f"Hello {name}. Doing something very secure with password.")
print(f"...just kidding, here it is, very insecure: {password}")
| 16 | 95 | 47 | 142 | import typer
from typing_extensions import Annotated
def main(
name: str,
password: Annotated[
str, typer.Option(prompt=True, confirmation_prompt=True, hide_input=True)
],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
password: Annotated[
str, typer.Option(prompt=True, confirmation_prompt=True, hide_input=True)
],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,606 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/prompt/tutorial001.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(name: str, lastname: str = typer.Option(..., prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = typer.Option(..., prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 61 | 20 | 81 | import typer
def main(name: str, lastname: str = typer.Option(..., prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = typer.Option(..., prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,607 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/prompt/tutorial001_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option(prompt=True)]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option(prompt=True)]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 73 | 20 | 93 | import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option(prompt=True)]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option(prompt=True)]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,608 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/prompt/tutorial002.py | 4,7 | 1,12 | main | 7,10 | 7,10 | import typer
def main(
name: str, lastname: str = typer.Option(..., prompt="Please tell me your last name")
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str, lastname: str = typer.Option(..., prompt="Please tell me your last name")
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 70 | 20 | 90 | import typer
def main(
name: str, lastname: str = typer.Option(..., prompt="Please tell me your last name")
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(
name: str, lastname: str = typer.Option(..., prompt="Please tell me your last name")
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,609 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/prompt/tutorial002_an.py | 5,9 | 1,14 | main | 9,12 | 9,12 | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(prompt="Please tell me your last name")],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(prompt="Please tell me your last name")],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 85 | 20 | 105 | import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(prompt="Please tell me your last name")],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
name: str,
lastname: Annotated[str, typer.Option(prompt="Please tell me your last name")],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,610 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/prompt/tutorial003.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(project_name: str = typer.Option(..., prompt=True, confirmation_prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(project_name: str = typer.Option(..., prompt=True, confirmation_prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Deleting project {project_name}")
| print(f"Deleting project {project_name}")
| 3 | 65 | 21 | 86 | import typer
def main(project_name: str = typer.Option(..., prompt=True, confirmation_prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(project_name: str = typer.Option(..., prompt=True, confirmation_prompt=True)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,611 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/prompt/tutorial003_an.py | 5,8 | 1,13 | main | 8,11 | 8,11 | import typer
from typing_extensions import Annotated
def main(
project_name: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
project_name: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Deleting project {project_name}")
| print(f"Deleting project {project_name}")
| 3 | 81 | 21 | 102 | import typer
from typing_extensions import Annotated
def main(
project_name: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(
project_name: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)],
):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,612 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/required/tutorial001.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(name: str, lastname: str = typer.Option()):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = typer.Option()):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 55 | 20 | 75 | import typer
def main(name: str, lastname: str = typer.Option()):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = typer.Option()):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,613 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/required/tutorial001_an.py | 5,6 | 1,11 | main | 6,9 | 6,9 | import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option()]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option()]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 69 | 20 | 89 | import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option()]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(name: str, lastname: Annotated[str, typer.Option()]):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,614 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/required/tutorial002.py | 4,5 | 1,10 | main | 5,8 | 5,8 | import typer
def main(name: str, lastname: str = typer.Option(default=...)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = typer.Option(default=...)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| print(f"Hello {name} {lastname}")
| print(f"Hello {name} {lastname}")
| 3 | 59 | 20 | 79 | import typer
def main(name: str, lastname: str = typer.Option(default=...)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(name: str, lastname: str = typer.Option(default=...)):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,615 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/version/tutorial001.py | 14,20 | 1,25 | main | 20,23 | 20,23 | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def main(
name: str = typer.Option("World"),
version: Optional[bool] = typer.Option(
None, "--version", ca... | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def main(
name: str = typer.Option("World"),
version: Optional[bool] = typer.Option(
None, "--version", ca... | print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 148 | 16 | 164 | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def main(
name: str = typer.Option("World"),
version: Optional[bool] = typer.Option(
None, "--version", ca... | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def main(
name: str = typer.Option("World"),
version: Optional[bool] = typer.Option(
None, "--version", ca... | |
26,616 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/version/tutorial001_an.py | 9,10 | 1,26 | version_callback | 10,15 | 10,15 | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef main(
name: Annotated[str, typer.Option()] = "World",
version: Annotated[
Optional[bool], typer.Option("--version", callback=version_callback)
... | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef main(
name: Annotated[str, typer.Option()] = "World",
version: Annotated[
Optional[bool], typer.Option("--version", callback=version_callback)
... | if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
| if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
| 8 | 147 | 39 | 186 | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef main(
name: Annotated[str, typer.Option()] = "World",
version: Annotated[
Optional[bool], typer.Option("--version", callback=version_callback)
... | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef main(
name: Annotated[str, typer.Option()] = "World",
version: Annotated[
Optional[bool], typer.Option("--version", callback=version_callback)
... | |
26,617 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/version/tutorial002.py | 8,9 | 1,30 | version_callback | 9,14 | 9,14 | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef name_callback(name: str):
if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
def main(
name: str = typer.Option(..., callback=name_callback),
version: Option... | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef name_callback(name: str):
if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
def main(
name: str = typer.Option(..., callback=name_callback),
version: Option... | if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
| if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
| 8 | 170 | 39 | 209 | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef name_callback(name: str):
if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
def main(
name: str = typer.Option(..., callback=name_callback),
version: Option... | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
FILL_FUNC_BODYdef name_callback(name: str):
if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
def main(
name: str = typer.Option(..., callback=name_callback),
version: Option... | |
26,618 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/version/tutorial002_an.py | 15,16 | 1,31 | name_callback | 16,20 | 16,20 | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
| if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
| 9 | 193 | 31 | 224 | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | |
26,619 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/version/tutorial003.py | 14,15 | 1,31 | name_callback | 15,20 | 15,20 | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: str = typer.Option(..., callback=name_callback),
versi... | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: str = typer.Option(..., callback=name_callback),
versi... | if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return name
| if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return name
| 11 | 184 | 36 | 220 | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: str = typer.Option(..., callback=name_callback),
versi... | from typing import Optional
import typer
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: str = typer.Option(..., callback=name_callback),
versi... | |
26,620 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options/version/tutorial003_an.py | 15,16 | 1,33 | name_callback | 16,21 | 16,21 | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return name
| if name != "Camila":
raise typer.BadParameter("Only Camila is allowed")
return name
| 11 | 202 | 36 | 238 | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | from typing import Optional
import typer
from typing_extensions import Annotated
__version__ = "0.1.0"
def version_callback(value: bool):
if value:
print(f"Awesome CLI Version: {__version__}")
raise typer.Exit()
def name_callback(name: str):
FILL_FUNC_BODYdef main(
name: Annotated[str, typ... | |
26,621 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial001.py | 6,8 | 1,13 | main | 8,11 | 8,11 | import typer
app = typer.Typer()
@app.command()
def main(name: str = typer.Option("World", help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def main(name: str = typer.Option("World", help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 74 | 16 | 90 | import typer
app = typer.Typer()
@app.command()
def main(name: str = typer.Option("World", help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
app = typer.Typer()
@app.command()
def main(name: str = typer.Option("World", help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,622 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial001_an.py | 7,9 | 1,14 | main | 9,12 | 9,12 | import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(name: Annotated[str, typer.Option(help="The name to say hi to.")] = "World"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(name: Annotated[str, typer.Option(help="The name to say hi to.")] = "World"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 89 | 16 | 105 | import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(name: Annotated[str, typer.Option(help="The name to say hi to.")] = "World"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(name: Annotated[str, typer.Option(help="The name to say hi to.")] = "World"):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,623 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial002.py | 4,5 | 1,22 | complete_name | 5,8 | 5,8 | import typer
def complete_name():
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="The name to say hi to.", autocompletion=complete_name
),
):
print(f"Hello {name}")
if __name__ == "__main__":
app()
| import typer
def complete_name():
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="The name to say hi to.", autocompletion=complete_name
),
):
print(f"Hello {name}")
if __name__ == "__main__":
app()
| return ["Camila", "Carlos", "Sebastian"]
| return ["Camila", "Carlos", "Sebastian"]
| 4 | 110 | 21 | 131 | import typer
def complete_name():
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="The name to say hi to.", autocompletion=complete_name
),
):
print(f"Hello {name}")
if __name__ == "__main__":
app()
| import typer
def complete_name():
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="The name to say hi to.", autocompletion=complete_name
),
):
print(f"Hello {name}")
if __name__ == "__main__":
app()
| |
26,624 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial002_an.py | 12,18 | 1,23 | main | 18,21 | 18,21 | import typer
from typing_extensions import Annotated
def complete_name():
return ["Camila", "Carlos", "Sebastian"]
app = typer.Typer()
@app.command()
def main(
name: Annotated[
str, typer.Option(help="The name to say hi to.", autocompletion=complete_name)
] = "World",
):
FILL_FUNC_BODYif __nam... | import typer
from typing_extensions import Annotated
def complete_name():
return ["Camila", "Carlos", "Sebastian"]
app = typer.Typer()
@app.command()
def main(
name: Annotated[
str, typer.Option(help="The name to say hi to.", autocompletion=complete_name)
] = "World",
):
FILL_FUNC_BODYif __nam... | print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 130 | 16 | 146 | import typer
from typing_extensions import Annotated
def complete_name():
return ["Camila", "Carlos", "Sebastian"]
app = typer.Typer()
@app.command()
def main(
name: Annotated[
str, typer.Option(help="The name to say hi to.", autocompletion=complete_name)
] = "World",
):
FILL_FUNC_BODYif __nam... | import typer
from typing_extensions import Annotated
def complete_name():
return ["Camila", "Carlos", "Sebastian"]
app = typer.Typer()
@app.command()
def main(
name: Annotated[
str, typer.Option(help="The name to say hi to.", autocompletion=complete_name)
] = "World",
):
FILL_FUNC_BODYif __nam... | |
26,625 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial003.py | 17,23 | 1,28 | main | 23,26 | 23,26 | import typer
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.command()
def main(
name: str = typer.Op... | import typer
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.command()
def main(
name: str = typer.Op... | print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 161 | 16 | 177 | import typer
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.command()
def main(
name: str = typer.Op... | import typer
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.command()
def main(
name: str = typer.Op... | |
26,626 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial003_an.py | 18,24 | 1,29 | main | 24,27 | 24,27 | import typer
from typing_extensions import Annotated
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.comm... | import typer
from typing_extensions import Annotated
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.comm... | print(f"Hello {name}")
| print(f"Hello {name}")
| 2 | 176 | 16 | 192 | import typer
from typing_extensions import Annotated
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.comm... | import typer
from typing_extensions import Annotated
valid_names = ["Camila", "Carlos", "Sebastian"]
def complete_name(incomplete: str):
completion = []
for name in valid_names:
if name.startswith(incomplete):
completion.append(name)
return completion
app = typer.Typer()
@app.comm... | |
26,627 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial004.py | 10,11 | 1,33 | complete_name | 11,19 | 11,19 | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | completion = []
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
completion_item = (name, help_text)
completion.append(completion_item)
return completion
| completion = []
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
completion_item = (name, help_text)
completion.append(completion_item)
return completion
| 17 | 167 | 71 | 238 | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | |
26,628 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial004_an.py | 11,12 | 1,34 | complete_name | 12,20 | 12,20 | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | completion = []
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
completion_item = (name, help_text)
completion.append(completion_item)
return completion
| completion = []
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
completion_item = (name, help_text)
completion.append(completion_item)
return completion
| 17 | 182 | 71 | 253 | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | |
26,629 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial005.py | 10,11 | 1,30 | complete_name | 11,16 | 11,16 | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| 10 | 167 | 45 | 212 | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: str = typer.Option(
"World", help="T... | |
26,630 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial005_an.py | 11,12 | 1,31 | complete_name | 12,17 | 12,17 | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| 10 | 182 | 45 | 227 | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name: Anno... | |
26,631 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial006.py | 8,10 | 1,16 | main | 10,14 | 10,14 | from typing import List
import typer
app = typer.Typer()
@app.command()
def main(name: List[str] = typer.Option(["World"], help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| from typing import List
import typer
app = typer.Typer()
@app.command()
def main(name: List[str] = typer.Option(["World"], help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| for each_name in name:
print(f"Hello {each_name}")
| for each_name in name:
print(f"Hello {each_name}")
| 6 | 84 | 28 | 112 | from typing import List
import typer
app = typer.Typer()
@app.command()
def main(name: List[str] = typer.Option(["World"], help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| from typing import List
import typer
app = typer.Typer()
@app.command()
def main(name: List[str] = typer.Option(["World"], help="The name to say hi to.")):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,632 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial006_an.py | 9,13 | 1,19 | main | 13,17 | 13,17 | from typing import List
import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(
name: Annotated[List[str], typer.Option(help="The name to say hi to.")] = ["World"],
):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| from typing import List
import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(
name: Annotated[List[str], typer.Option(help="The name to say hi to.")] = ["World"],
):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| for each_name in name:
print(f"Hello {each_name}")
| for each_name in name:
print(f"Hello {each_name}")
| 6 | 100 | 28 | 128 | from typing import List
import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(
name: Annotated[List[str], typer.Option(help="The name to say hi to.")] = ["World"],
):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| from typing import List
import typer
from typing_extensions import Annotated
app = typer.Typer()
@app.command()
def main(
name: Annotated[List[str], typer.Option(help="The name to say hi to.")] = ["World"],
):
FILL_FUNC_BODYif __name__ == "__main__":
app()
| |
26,633 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial007.py | 12,13 | 1,34 | complete_name | 13,19 | 13,19 | from typing import List
import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name:... | from typing import List
import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name:... | names = ctx.params.get("name") or []
for name, help_text in valid_completion_items:
if name.startswith(incomplete) and name not in names:
yield (name, help_text)
| names = ctx.params.get("name") or []
for name, help_text in valid_completion_items:
if name.startswith(incomplete) and name not in names:
yield (name, help_text)
| 20 | 189 | 66 | 255 | from typing import List
import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name:... | from typing import List
import typer
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Typer()
@app.command()
def main(
name:... | |
26,634 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial007_an.py | 13,14 | 1,36 | complete_name | 14,20 | 14,20 | from typing import List
import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Type... | from typing import List
import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Type... | names = ctx.params.get("name") or []
for name, help_text in valid_completion_items:
if name.startswith(incomplete) and name not in names:
yield (name, help_text)
| names = ctx.params.get("name") or []
for name, help_text in valid_completion_items:
if name.startswith(incomplete) and name not in names:
yield (name, help_text)
| 20 | 205 | 66 | 271 | from typing import List
import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Type... | from typing import List
import typer
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
def complete_name(ctx: typer.Context, incomplete: str):
FILL_FUNC_BODYapp = typer.Type... | |
26,635 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial008.py | 15,16 | 1,37 | complete_name | 16,22 | 16,22 | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(args: List[str], incomplete: str):
FILL... | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(args: List[str], incomplete: str):
FILL... | err_console.print(f"{args}")
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| err_console.print(f"{args}")
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| 11 | 208 | 60 | 268 | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(args: List[str], incomplete: str):
FILL... | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(args: List[str], incomplete: str):
FILL... | |
26,636 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial008_an.py | 16,17 | 1,39 | complete_name | 17,23 | 17,23 | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | err_console.print(f"{args}")
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| err_console.print(f"{args}")
for name, help_text in valid_completion_items:
if name.startswith(incomplete):
yield (name, help_text)
| 11 | 224 | 60 | 284 | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | |
26,637 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial009.py | 26,32 | 1,38 | main | 32,36 | 32,36 | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(ctx: typer.Context, args: List[str], in... | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(ctx: typer.Context, args: List[str], in... | for n in name:
print(f"Hello {n}")
| for n in name:
print(f"Hello {n}")
| 6 | 269 | 24 | 293 | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(ctx: typer.Context, args: List[str], in... | from typing import List
import typer
from rich.console import Console
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name(ctx: typer.Context, args: List[str], in... | |
26,638 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/options_autocompletion/tutorial009_an.py | 16,17 | 1,40 | complete_name | 17,24 | 17,24 | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | err_console.print(f"{args}")
names = ctx.params.get("name") or []
for name, help_text in valid_completion_items:
if name.startswith(incomplete) and name not in names:
yield (name, help_text)
| err_console.print(f"{args}")
names = ctx.params.get("name") or []
for name, help_text in valid_completion_items:
if name.startswith(incomplete) and name not in names:
yield (name, help_text)
| 21 | 231 | 81 | 312 | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | from typing import List
import typer
from rich.console import Console
from typing_extensions import Annotated
valid_completion_items = [
("Camila", "The reader of books."),
("Carlos", "The writer of scripts."),
("Sebastian", "The type hints guy."),
]
err_console = Console(stderr=True)
def complete_name... | |
26,639 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/parameter_types/bool/tutorial001.py | 4,5 | 1,13 | main | 5,11 | 5,11 | import typer
def main(force: bool = typer.Option(False, "--force")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(force: bool = typer.Option(False, "--force")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if force:
print("Forcing operation")
else:
print("Not forcing")
| if force:
print("Forcing operation")
else:
print("Not forcing")
| 7 | 56 | 32 | 88 | import typer
def main(force: bool = typer.Option(False, "--force")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(force: bool = typer.Option(False, "--force")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,640 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/parameter_types/bool/tutorial001_an.py | 5,6 | 1,14 | main | 6,12 | 6,12 | import typer
from typing_extensions import Annotated
def main(force: Annotated[bool, typer.Option("--force")] = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(force: Annotated[bool, typer.Option("--force")] = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if force:
print("Forcing operation")
else:
print("Not forcing")
| if force:
print("Forcing operation")
else:
print("Not forcing")
| 7 | 68 | 32 | 100 | import typer
from typing_extensions import Annotated
def main(force: Annotated[bool, typer.Option("--force")] = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
from typing_extensions import Annotated
def main(force: Annotated[bool, typer.Option("--force")] = False):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,641 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/parameter_types/bool/tutorial002.py | 6,7 | 1,17 | main | 7,15 | 7,15 | from typing import Optional
import typer
def main(accept: Optional[bool] = typer.Option(None, "--accept/--reject")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def main(accept: Optional[bool] = typer.Option(None, "--accept/--reject")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if accept is None:
print("I don't know what you want yet")
elif accept:
print("Accepting!")
else:
print("Rejecting!")
| if accept is None:
print("I don't know what you want yet")
elif accept:
print("Accepting!")
else:
print("Rejecting!")
| 16 | 69 | 57 | 126 | from typing import Optional
import typer
def main(accept: Optional[bool] = typer.Option(None, "--accept/--reject")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
def main(accept: Optional[bool] = typer.Option(None, "--accept/--reject")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,642 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/parameter_types/bool/tutorial002_an.py | 7,8 | 1,18 | main | 8,16 | 8,16 | from typing import Optional
import typer
from typing_extensions import Annotated
def main(accept: Annotated[Optional[bool], typer.Option("--accept/--reject")] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
from typing_extensions import Annotated
def main(accept: Annotated[Optional[bool], typer.Option("--accept/--reject")] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if accept is None:
print("I don't know what you want yet")
elif accept:
print("Accepting!")
else:
print("Rejecting!")
| if accept is None:
print("I don't know what you want yet")
elif accept:
print("Accepting!")
else:
print("Rejecting!")
| 16 | 80 | 57 | 137 | from typing import Optional
import typer
from typing_extensions import Annotated
def main(accept: Annotated[Optional[bool], typer.Option("--accept/--reject")] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| from typing import Optional
import typer
from typing_extensions import Annotated
def main(accept: Annotated[Optional[bool], typer.Option("--accept/--reject")] = None):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| |
26,643 | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer | /home/hieuvd/dung_repo/raw/stars_01/tiangolo_typer/typer/docs_src/parameter_types/bool/tutorial003.py | 4,5 | 1,13 | main | 5,11 | 5,11 | import typer
def main(force: bool = typer.Option(False, "--force/--no-force", "-f/-F")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(force: bool = typer.Option(False, "--force/--no-force", "-f/-F")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| if force:
print("Forcing operation")
else:
print("Not forcing")
| if force:
print("Forcing operation")
else:
print("Not forcing")
| 7 | 66 | 32 | 98 | import typer
def main(force: bool = typer.Option(False, "--force/--no-force", "-f/-F")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
| import typer
def main(force: bool = typer.Option(False, "--force/--no-force", "-f/-F")):
FILL_FUNC_BODYif __name__ == "__main__":
typer.run(main)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.