8000 Clarify that mypy_path is relative to CWD (#9959) · python/mypy@68a0c65 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68a0c65

Browse files
author
Gustav Gränsbo
authored
Clarify that mypy_path is relative to CWD (#9959)
1 parent 1cebbf2 commit 68a0c65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/config_file.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ section of the command line docs.
177177
Multiple paths are always separated with a ``:`` or ``,`` regardless of the platform.
178178
User home directory and environment variables will be expanded.
179179

180+
Relative paths are treated relative to the working directory of the mypy command,
181+
not the config file.
182+
Use the ``MYPY_CONFIG_FILE_DIR`` environment variable to refer to paths relative to
183+
the config file (e.g. ``mypy_path = $MYPY_CONFIG_FILE_DIR/src``).
184+
180185
This option may only be set in the global section (``[mypy]``).
181186

182187
**Note:** On Windows, use UNC paths to avoid using ``:`` (e.g. ``\\127.0.0.1\X$\MyDir`` where ``X`` is the drive letter).

0 commit comments

Comments
 (0)
0