-
-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/autocompletion
- Loading branch information
Showing
22 changed files
with
376 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ jobs: | |
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }} | ||
run: python -m build | ||
- name: Publish | ||
uses: pypa/[email protected].1 | ||
uses: pypa/[email protected].3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
-e . | ||
|
||
mkdocs-material==9.5.35 | ||
mkdocs-material==9.5.44 | ||
mdx-include >=1.4.1,<2.0.0 | ||
mkdocs-redirects>=1.2.1,<1.3.0 | ||
pyyaml >=5.3.1,<7.0.0 | ||
# For Material for MkDocs, Chinese search | ||
# jieba==0.42.1 | ||
# For image processing by Material for MkDocs | ||
pillow==10.4.0 | ||
pillow==11.0.0 | ||
# For image processing by Material for MkDocs | ||
cairosvg==2.7.1 | ||
# mkdocstrings[python]==0.25.1 | ||
# Enable griffe-typingdoc once dropping Python 3.7 and upgrading typing-extensions | ||
# griffe-typingdoc==0.2.5 | ||
# For griffe, it formats with black | ||
# black==24.3.0 | ||
mkdocs-macros-plugin==1.2.0 | ||
mkdocs-macros-plugin==1.3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
-r requirements-tests.txt | ||
-r requirements-docs.txt | ||
|
||
pre-commit >=2.17.0,<4.0.0 | ||
pre-commit >=2.17.0,<5.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import typer | ||
|
||
image_desc = [ | ||
("alpine:latest", "latest alpine image"), | ||
("alpine:hello", "fake image: for testing"), | ||
("nvidia/cuda:10.0-devel-ubuntu18.04", ""), | ||
] | ||
|
||
|
||
def _complete(incomplete: str) -> str: | ||
for image, desc in image_desc: | ||
if image.startswith(incomplete): | ||
yield image, desc | ||
|
||
|
||
app = typer.Typer() | ||
|
||
|
||
@app.command() | ||
def image(name: str = typer.Option(autocompletion=_complete)): | ||
typer.echo(name) | ||
|
||
|
||
if __name__ == "__main__": | ||
app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.