Skip to content

Commit

Permalink
Only expose the equiv of from typing import * in prelude files (pan…
Browse files Browse the repository at this point in the history
  • Loading branch information
kaos committed Mar 9, 2023
1 parent 4e63599 commit c467e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/pants/engine/internals/build_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def evaluate_preludes(
)
globals: dict[str, Any] = {
**{name: getattr(builtins, name) for name in dir(builtins) if name.endswith("Error")},
**{name: getattr(typing, name) for name in dir(typing)},
**{name: getattr(typing, name) for name in typing.__all__},
# Ensure the globals for each prelude includes the builtin symbols (E.g. `python_sources`)
# and any build file aliases (e.g. from plugins)
**parser.symbols,
Expand Down

0 comments on commit c467e51

Please sign in to comment.