Skip to content

Commit db13485

Browse files
committed
📝 Update link syntax to minimal Markdown
1 parent 9bbfa9d commit db13485

36 files changed

+161
-161
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
<em>Typer, build great CLIs. Easy to code. Based on Python type hints.</em>
77
</p>
88
<p align="center">
9-
<a href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
9+
<a href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster">
1010
<img src="https://github.com/fastapi/typer/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
1111
</a>
12-
<a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish" target="_blank">
12+
<a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish">
1313
<img src="https://github.com/fastapi/typer/workflows/Publish/badge.svg" alt="Publish">
1414
</a>
15-
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer" target="_blank">
15+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer">
1616
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/typer.svg" alt="Coverage">
17-
<a href="https://pypi.org/project/typer" target="_blank">
17+
<a href="https://pypi.org/project/typer">
1818
<img src="https://img.shields.io/pypi/v/typer?color=%2334D058&label=pypi%20package" alt="Package version">
1919
</a>
2020
</p>
2121

2222
---
2323

24-
**Documentation**: <a href="https://typer.tiangolo.com" target="_blank">https://typer.tiangolo.com</a>
24+
**Documentation**: [https://typer.tiangolo.com](https://typer.tiangolo.com)
2525

26-
**Source Code**: <a href="https://github.com/fastapi/typer" target="_blank">https://github.com/fastapi/typer</a>
26+
**Source Code**: [https://github.com/fastapi/typer](https://github.com/fastapi/typer)
2727

2828
---
2929

@@ -42,11 +42,11 @@ The key features are:
4242

4343
## FastAPI of CLIs
4444

45-
**Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling, it's the FastAPI of CLIs.
45+
**Typer** is [FastAPI](https://fastapi.tiangolo.com)'s little sibling, it's the FastAPI of CLIs.
4646

4747
## Installation
4848

49-
Create and activate a <a href="https://typer.tiangolo.com/virtual-environments/" class="external-link" target="_blank">virtual environment</a> and then install **Typer**:
49+
Create and activate a [virtual environment](https://typer.tiangolo.com/virtual-environments/) and then install **Typer**:
5050

5151
<div class="termy">
5252

@@ -354,9 +354,9 @@ For a more complete example including more features, see the <a href="https://ty
354354

355355
**Typer** stands on the shoulders of giants. It has three required dependencies:
356356

357-
* <a href="https://click.palletsprojects.com/" class="external-link" target="_blank">Click</a>: a popular tool for building CLIs in Python. Typer is based on it.
358-
* <a href="https://rich.readthedocs.io/en/stable/index.html" class="external-link" target="_blank"><code>rich</code></a>: to show nicely formatted errors automatically.
359-
* <a href="https://github.com/sarugaku/shellingham" class="external-link" target="_blank"><code>shellingham</code></a>: to automatically detect the current shell when installing completion.
357+
* [Click](https://click.palletsprojects.com/): a popular tool for building CLIs in Python. Typer is based on it.
358+
* [`rich`](https://rich.readthedocs.io/en/stable/index.html): to show nicely formatted errors automatically.
359+
* [`shellingham`](https://github.com/sarugaku/shellingham): to automatically detect the current shell when installing completion.
360360

361361
### `typer-slim`
362362

docs/alternatives.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ There have been many tools created before that have helped inspire its creation.
1010

1111
## Previous tools
1212

13-
### <a href="https://docs.python.org/3/library/argparse.html" class="external-link" target="_blank">`argparse`</a>
13+
### [`argparse`](https://docs.python.org/3/library/argparse.html)
1414

1515
`argparse` is the Python standard library's module to write CLIs.
1616

@@ -22,7 +22,7 @@ Provide a better development experience than just reading *CLI Parameters* by ha
2222

2323
///
2424

25-
### <a href="https://hugapi.github.io/hug/" class="external-link" target="_blank">Hug</a>
25+
### [Hug](https://hugapi.github.io/hug/)
2626

2727
Hug is a library to create APIs and CLIs, it uses parameters in functions to declare the required data.
2828

@@ -34,7 +34,7 @@ Use function parameters to declare *CLI arguments* and *CLI options* as it simpl
3434

3535
///
3636

37-
### <a href="https://plac.readthedocs.io/en/latest/" class="external-link" target="_blank">Plac</a>
37+
### [Plac](https://plac.readthedocs.io/en/latest/)
3838

3939
Plac is another library to create CLIs using parameters in functions, similar to Hug.
4040

@@ -44,7 +44,7 @@ Provide a simple way to use a function as a command line app, without having to
4444

4545
///
4646

47-
### <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a>
47+
### [Pydantic](https://pydantic-docs.helpmanual.io/)
4848

4949
Pydantic is a library to handle data validation using standard modern Python type annotations.
5050

@@ -58,7 +58,7 @@ Use standard Python type annotations to declare types instead of library-specifi
5858

5959
///
6060

61-
### <a href="https://click.palletsprojects.com" class="external-link" target="_blank">Click</a>
61+
### [Click](https://click.palletsprojects.com)
6262

6363
Click is one of the most widely used libraries to create CLIs in Python.
6464

@@ -76,11 +76,11 @@ Everything. 🚀
7676

7777
**Typer** mainly adds a layer on top of Click, making the code simpler and easier to use, with autocompletion everywhere, etc, but providing all the powerful features of Click underneath.
7878

79-
As someone pointed out: <em><a href="https://twitter.com/fishnets88/status/1210126833745838080" class="external-link" target="_blank">"Nice to see it is built on Click but adds the type stuff. Me gusta!"</a></em>
79+
As someone pointed out: <em>["Nice to see it is built on Click but adds the type stuff. Me gusta!"](https://twitter.com/fishnets88/status/1210126833745838080)</em>
8080

8181
///
8282

83-
### <a href="https://github.com/click-contrib/click-completion" class="external-link" target="_blank">`click-completion`</a>
83+
### [`click-completion`](https://github.com/click-contrib/click-completion)
8484

8585
`click-completion` is a plug-in for Click. It was created to extend completion support for shells when Click only had support for Bash completion.
8686

@@ -94,9 +94,9 @@ Provide auto completion for all the shells.
9494

9595
///
9696

97-
### <a href="https://fastapi.tiangolo.com/" class="external-link" target="_blank">FastAPI</a>
97+
### [FastAPI](https://fastapi.tiangolo.com/)
9898

99-
I created **FastAPI** to provide an easy way to build APIs with autocompletion for everything in the code (and some other <a href="https://fastapi.tiangolo.com/features/" class="external-link" target="_blank">features</a>).
99+
I created **FastAPI** to provide an easy way to build APIs with autocompletion for everything in the code (and some other [features](https://fastapi.tiangolo.com/features/)).
100100

101101
**Typer** is the "FastAPI of CLIs".
102102

docs/contributing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Development - Contributing
22

3-
First, you might want to see the basic ways to [help Typer and get help](help-typer.md){.internal-link target=_blank}.
3+
First, you might want to see the basic ways to [help Typer and get help](help-typer.md).
44

55
## Developing
66

7-
If you already cloned the <a href="https://github.com/fastapi/typer" class="external-link" target="_blank">typer repository</a> and you want to deep dive in the code, here are some guidelines to set up your environment.
7+
If you already cloned the [typer repository](https://github.com/fastapi/typer) and you want to deep dive in the code, here are some guidelines to set up your environment.
88

99
### Install Requirements Using `uv`
1010

@@ -253,7 +253,7 @@ $ mkdocs serve --dev-addr 8008
253253

254254
The instructions here show you how to use the script at `./scripts/docs.py` with the `python` program directly.
255255

256-
But you can also use <a href="https://typer.tiangolo.com/typer-cli/" class="external-link" target="_blank">Typer CLI</a>, and you will get autocompletion in your terminal for the commands after installing completion.
256+
But you can also use [Typer CLI](https://typer.tiangolo.com/typer-cli/), and you will get autocompletion in your terminal for the commands after installing completion.
257257

258258
If you install Typer CLI, you can install completion with:
259259

@@ -270,7 +270,7 @@ Completion will take effect once you restart the terminal.
270270

271271
### Docs Structure
272272

273-
The documentation uses <a href="https://www.mkdocs.org/" class="external-link" target="_blank">MkDocs</a>.
273+
The documentation uses [MkDocs](https://www.mkdocs.org/).
274274

275275
And there are extra tools/scripts in place in `./scripts/docs.py`.
276276

@@ -316,7 +316,7 @@ The same applies to comments and descriptions, please don't copy paste the conte
316316

317317
### Human Effort Denial of Service
318318

319-
Using automated tools and AI to submit PRs or comments that we have to carefully review and handle would be the equivalent of a <a href="https://en.wikipedia.org/wiki/Denial-of-service_attack" class="external-link" target="_blank">Denial-of-service attack</a> on our human effort.
319+
Using automated tools and AI to submit PRs or comments that we have to carefully review and handle would be the equivalent of a [Denial-of-service attack](https://en.wikipedia.org/wiki/Denial-of-service_attack) on our human effort.
320320

321321
It would be very little effort from the person submitting the PR (an LLM prompt) that generates a large amount of effort on our side (carefully reviewing code).
322322

docs/environment-variables.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ print(f"Hello {name} from Python")
6767

6868
/// tip
6969

70-
The second argument to <a href="https://docs.python.org/3.8/library/os.html#os.getenv" class="external-link" target="_blank">`os.getenv()`</a> is the default value to return.
70+
The second argument to [`os.getenv()`](https://docs.python.org/3.8/library/os.html#os.getenv) is the default value to return.
7171

7272
If not provided, it's `None` by default, here we provide `"World"` as the default value to use.
7373

@@ -155,7 +155,7 @@ Hello World from Python
155155

156156
/// tip
157157

158-
You can read more about it at <a href="https://12factor.net/config" class="external-link" target="_blank">The Twelve-Factor App: Config</a>.
158+
You can read more about it at [The Twelve-Factor App: Config](https://12factor.net/config).
159159

160160
///
161161

@@ -165,7 +165,7 @@ These environment variables can only handle **text strings**, as they are extern
165165

166166
That means that **any value** read in Python from an environment variable **will be a `str`**, and any conversion to a different type or any validation has to be done in code.
167167

168-
You will learn more about using environment variables for your <abbr title="command line interface">CLI</abbr> applications later in the section about [CLI Arguments with Environment Variables](./tutorial/arguments/envvar.md){.internal-link target=_blank}.
168+
You will learn more about using environment variables for your <abbr title="command line interface">CLI</abbr> applications later in the section about [CLI Arguments with Environment Variables](./tutorial/arguments/envvar.md).
169169

170170
## `PATH` Environment Variable
171171

@@ -283,15 +283,15 @@ $ C:\opt\custompython\bin\python
283283

284284
////
285285

286-
This information will be useful when learning about [Virtual Environments](virtual-environments.md){.internal-link target=_blank}.
286+
This information will be useful when learning about [Virtual Environments](virtual-environments.md).
287287

288288
It will also be useful when you **create your own CLI programs** as, for them to be available for your users, they will need to be somewhere in the `PATH` environment variable.
289289

290290
## Conclusion
291291

292292
With this you should have a basic understanding of what **environment variables** are and how to use them in Python.
293293

294-
You can also read more about them in the <a href="https://en.wikipedia.org/wiki/Environment_variable" class="external-link" target="_blank">Wikipedia for Environment Variable</a>.
294+
You can also read more about them in the [Wikipedia for Environment Variable](https://en.wikipedia.org/wiki/Environment_variable).
295295

296296
In many cases it's not very obvious how environment variables would be useful and applicable right away. But they keep showing up in many different scenarios when you are developing, so it's good to know about them.
297297

docs/features.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
## Design based on **FastAPI**
44

5-
<a href="https://fastapi.tiangolo.com" target="_blank"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" style="width: 20%;"></a>
5+
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" style="width: 20%;"></a>
66

7-
**Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling.
7+
**Typer** is [FastAPI](https://fastapi.tiangolo.com)'s little sibling.
88

99
It follows the same design and ideas. If you know **FastAPI**, you already know **Typer**... more or less.
1010

1111
## Just Modern Python
1212

1313
It's all based on standard **Python type** declarations. No new syntax to learn. Just standard modern Python.
1414

15-
If you need a 2 minute refresher of how to use Python types (even if you don't use FastAPI or Typer), check the FastAPI tutorial section: <a href="https://fastapi.tiangolo.com/python-types/" class="external-link" target="_blank">Python types intro</a>.
15+
If you need a 2 minute refresher of how to use Python types (even if you don't use FastAPI or Typer), check the FastAPI tutorial section: [Python types intro](https://fastapi.tiangolo.com/python-types/).
1616

17-
You will also see a 20 seconds refresher on the section [Tutorial - User Guide: First Steps](tutorial/first-steps.md){.internal-link target=_blank}.
17+
You will also see a 20 seconds refresher on the section [Tutorial - User Guide: First Steps](tutorial/first-steps.md).
1818

1919
## Editor support
2020

@@ -24,11 +24,11 @@ You will rarely need to come back to the docs.
2424

2525
Here's how your editor might help you:
2626

27-
* in <a href="https://code.visualstudio.com/" class="external-link" target="_blank">Visual Studio Code</a>:
27+
* in [Visual Studio Code](https://code.visualstudio.com/):
2828

2929
![editor support](img/vscode-completion.png)
3030

31-
* in <a href="https://www.jetbrains.com/pycharm/" class="external-link" target="_blank">PyCharm</a>:
31+
* in [PyCharm](https://www.jetbrains.com/pycharm/):
3232

3333
![editor support](img/pycharm-completion.png)
3434

0 commit comments

Comments
 (0)