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 1 commit
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
Prev Previous commit
Added os.path.dirname() for config_file
  • Loading branch information
ashutosh1919 committed Apr 1, 2020
commit ea3b887708ecca952f3bc15a085eaa76fe6c4dfd
4 changes: 2 additions & 2 deletions mypy/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def parse_config_file(options: Options, set_strict_flags: Callable[[], None],
continue
try:
if 'MYPY_CONFIG_FILE_DIR' not in os.environ:
os.environ['MYPY_CONFIG_FILE_DIR'] = config_file
os.environ['MYPY_CONFIG_FILE_DIR'] = os.path.dirname(config_file)
else:
os.environ['MYPY_CONFIG_FILE_DIR'] += os.pathsep + config_file
os.environ['MYPY_CONFIG_FILE_DIR'] += os.pathsep + os.path.dirname(config_file)
parser.read(config_file)
except configparser.Error as err:
print("%s: %s" % (config_file, err), file=stderr)
Expand Down