Skip to content

Commit cb0a446

Browse files
authored
Fix variable name in comment in getting_started.rst (#15587)
This PR fixes a word within a code block of the `Getting Started/Types from libraries` documentation. In particular, the variable name `file_path` is used instead of the correct `template_path`. This commit fixes that and it replaces `file_path` with `template_path`. This PR doesn't change the behaviour of `mypy` code since it involves just a word change in the documentation, so no tests are provided and it is expected that current working code works as usual, given the change made by this PR.
1 parent 781dc8f commit cb0a446

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Python standard library. For example, here is a function which uses the
264264
from pathlib import Path
265265
266266
def load_template(template_path: Path, name: str) -> str:
267-
# Mypy knows that `file_path` has a `read_text` method that returns a str
267+
# Mypy knows that `template_path` has a `read_text` method that returns a str
268268
template = template_path.read_text()
269269
# ...so it understands this line type checks
270270
return template.replace('USERNAME', name)

0 commit comments

Comments
 (0)