File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ def context(self) -> _Context:
319319 def visit_Raise (self , node : ast .Raise ) -> ast .AST : # noqa: N802
320320 bubbles = self .context .add_exception (node )
321321 if bubbles :
322- assert len (self .contexts ) > 1
322+ assert len (self .contexts ) >= 1
323323 if len (self .contexts ) < 2 :
324324 return self .generic_visit (node )
325325 parent_context = self .contexts [- 2 ]
@@ -378,7 +378,11 @@ def visit_Assert(self, node: ast.Assert) -> ast.AST: # noqa: N802
378378 # exceptions.
379379 self .visit_Raise (
380380 ast .Raise (
381- exc = ast .Call (func = ast .Name (id = "AssertionError" , ctx = ast .Load ())),
381+ exc = ast .Call (
382+ func = ast .Name (id = "AssertionError" , ctx = ast .Load ()),
383+ args = [],
384+ keywords = [],
385+ ),
382386 )
383387 )
384388 # Make sure that we also execute a visit_Assert method in another analysis
You can’t perform that action at this time.
0 commit comments