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

Initial fix #1298

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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 jac/jaclang/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import importlib
import marshal
import os
import pathlib
import pickle
import shutil
import types
Expand Down Expand Up @@ -497,6 +498,9 @@ def start_cli() -> None:
Returns:
- None
"""
os.environ["MYPYPATH"] = str(
pathlib.Path(os.path.dirname(__file__)).parent / "stubs"
)
parser = cmd_registry.parser
args = parser.parse_args()
cmd_registry.args = args
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 12 additions & 12 deletions jac/jaclang/vendor/mypy/modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,18 +813,18 @@ def compute_search_paths(
# We only use site packages for this check
for site in site_packages:
assert site not in lib_path
if (
site in mypypath
or any(p.startswith(site + os.path.sep) for p in mypypath)
or (os.path.altsep and any(p.startswith(site + os.path.altsep) for p in mypypath))
):
print(f"{site} is in the MYPYPATH. Please remove it.", file=sys.stderr)
print(
"See https://mypy.readthedocs.io/en/stable/running_mypy.html"
"#how-mypy-handles-imports for more info",
file=sys.stderr,
)
sys.exit(1)
# if (
# site in mypypath
# or any(p.startswith(site + os.path.sep) for p in mypypath)
# or (os.path.altsep and any(p.startswith(site + os.path.altsep) for p in mypypath))
# ):
# print(f"{site} is in the MYPYPATH. Please remove it.", file=sys.stderr)
# print(
# "See https://mypy.readthedocs.io/en/stable/running_mypy.html"
# "#how-mypy-handles-imports for more info",
# file=sys.stderr,
# )
# sys.exit(1)

return SearchPaths(
python_path=tuple(reversed(python_path)),
Expand Down
Loading