Skip to content

Commit

Permalink
Only expose the equiv of from typing import * in prelude files (Che…
Browse files Browse the repository at this point in the history
…rry-pick of #18452) (#18455)

Fixes #18451 (bug introduced in #18442)
  • Loading branch information
kaos authored Mar 9, 2023
1 parent 4e63599 commit a651501
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 a651501

Please sign in to comment.