Skip to content

Commit

Permalink
doc: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Aug 25, 2024
1 parent 960dee1 commit de6b2fa
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions executing/_position_node_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,14 @@ def known_issues(self, node: EnhancedAST, instruction: dis.Instruction) -> None:
raise KnownIssue(f"can not map {instruction.opname} to two ast nodes")

if instruction.opname == "LOAD_FAST" and instruction.argval == "__class__":
# example:
# class T:
# def a():
# super()
# some_node # <- there is a LOAD_FAST for this node because we use super()

raise KnownIssue(
f"loading of __class__ is accociated with a random node at the end of a class"
f"loading of __class__ is accociated with a random node at the end of a class if you use super()"
)

if (
Expand Down Expand Up @@ -784,8 +790,9 @@ def node_match(node_type: Union[Type, Tuple[Type, ...]], **kwargs: Any) -> bool:
ast.AsyncFunctionDef,
)
):
# closures
# TODO: better check that this is actualy a closure variable
# These are loads for closure variables.
# It is difficult to check that this is actually closure variable, see:
# https://github.com/alexmojaki/executing/pull/80#discussion_r1716027317
return

if (
Expand Down

0 comments on commit de6b2fa

Please sign in to comment.