Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified expand_path in config_parser to add environment var for mypy_path #8574

Closed
wants to merge 5 commits into from
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mypy/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def parse_config_file(options: Options, set_strict_flags: Callable[[], None],
if not os.path.exists(config_file):
continue
try:
if 'MYPY_CONFIG_FILE_DIR' not in os.environ:
os.environ['MYPY_CONFIG_FILE_DIR'] = config_file
ashutosh1919 marked this conversation as resolved.
Show resolved Hide resolved
else:
os.environ['MYPY_CONFIG_FILE_DIR'] += os.pathsep + config_file
parser.read(config_file)
except configparser.Error as err:
print("%s: %s" % (config_file, err), file=stderr)
Expand Down