Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
victorphoenix3 committed Jul 22, 2020
1 parent c4e3e46 commit 152f786
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/commands/callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Usage: main.py [OPTIONS] COMMAND [ARGS]...
Manage users in the awesome CLI app.

Options:
--verbose / --no-verbose
--verbose / --no-verbose [default: False]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ python main.py --help
Usage: main.py [OPTIONS] [NAMES]...

Arguments:
[NAMES]... [default: Harry, Hermione, Ron]
[NAMES]... Select 3 characters to play with [default: Harry, Hermione,Ron]

Options:
--install-completion Install completion for the current shell.
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial/parameter-types/bool.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $ python main.py --help
Usage: main.py [OPTIONS]

Options:
--force
--force [default: False]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down Expand Up @@ -121,7 +121,7 @@ $ python main.py --help
Usage: main.py [OPTIONS]

Options:
-f, --force / -F, --no-force
-f, --force / -F, --no-force [default: False]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down Expand Up @@ -166,7 +166,7 @@ $ python main.py --help
Usage: main.py [OPTIONS]

Options:
/ -d, --demo
/ -d, --demo [default: True]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down
6 changes: 5 additions & 1 deletion docs/tutorial/parameter-types/datetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ Check it:
```console
$ python main.py --help

Usage: main.py [OPTIONS] [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
Usage: main.py [OPTIONS] BIRTH:[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]

Arguments:
BIRTH:[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
[required]

Options:
--install-completion Install completion for the current shell.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/parameter-types/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ python main.py --help
Usage: main.py [OPTIONS]

Options:
--network [simple|conv|lstm]
--network [simple|conv|lstm] [default: simple]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down
9 changes: 6 additions & 3 deletions docs/tutorial/parameter-types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ $ python main.py --help
// Notice how --age is an INTEGER and --height-meters is a FLOAT
Usage: main.py [OPTIONS] NAME

Arguments:
NAME [required]

Options:
--age INTEGER
--height-meters FLOAT
--female / --no-female
--age INTEGER [default: 20]
--height-meters FLOAT [default: 1.89]
--female / --no-female [default: True]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down
7 changes: 5 additions & 2 deletions docs/tutorial/parameter-types/number.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ $ python main.py --help
// Notice the extra RANGE in the help text for --age and --score
Usage: main.py [OPTIONS] ID

Arguments:
ID [required]

Options:
--age INTEGER RANGE
--score FLOAT RANGE
--age INTEGER RANGE [default: 20]
--score FLOAT RANGE [default: 0]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Expand Down
3 changes: 1 addition & 2 deletions docs_src/subcommands/tutorial001/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import typer

import items
import typer
import users

app = typer.Typer()
Expand Down
3 changes: 1 addition & 2 deletions docs_src/subcommands/tutorial003/lands.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import typer

import reigns
import towns
import typer

app = typer.Typer()
app.add_typer(reigns.app, name="reigns")
Expand Down
3 changes: 1 addition & 2 deletions docs_src/subcommands/tutorial003/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import typer

import items
import lands
import typer
import users

app = typer.Typer()
Expand Down
1 change: 0 additions & 1 deletion typer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Typer, build great CLIs. Easy to code. Based on Python type hints."""

__version__ = "0.3.1"

from click.exceptions import Abort, BadParameter, Exit
from click.termui import (
clear,
Expand Down

0 comments on commit 152f786

Please sign in to comment.