Skip to content

Commit

Permalink
Fix arg name
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Feb 12, 2025
1 parent 2da5fe8 commit 54b39ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/attr/_make.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,12 @@ def _linecache_and_compile(
script: str,
filename: str,
globs: dict[str, Any] | None,
locs: Mapping[str, object] | None = None,
locals: Mapping[str, object] | None = None,
) -> dict[str, Any]:
"""
Cache the script with _linecache_, compile it and return the _locals_.
"""

locs = {} if locals is None else locals

# In order of debuggers like PDB being able to step through the code,
Expand Down Expand Up @@ -767,8 +768,8 @@ def _eval_snippets(self) -> None:

locs = _linecache_and_compile(
script,
filename=_generate_unique_filename(self._cls, "methods"),
globs=globs,
_generate_unique_filename(self._cls, "methods"),
globs,
)

for _, _, hook in self._script_snippets:
Expand Down

0 comments on commit 54b39ae

Please sign in to comment.