-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
As reported on #3128, there is a bug when the handler bound object is being used inside a generator causing a false positive. This was due to the way we were identifying if the object was "inside" its handler or not. In the previous implementation we would visit the node parents until we reached the object scope (in the generator case, the scope of the node is the generator, not the handler), while this change continues to go up the parent stack until it reaches its parent handler, or, if it's not inside its handler, it reaches the module's parent (None). Object is considered inside its handler if it reaches it by going up in the parent chain. It's considered outside its handler if it reaches None. Signed-off-by: Gabriel R Sezefredo <g@briel.dev>
- Loading branch information
1 parent
2f43a6c
commit 89d29d7
Showing
4 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters