Skip to content

Single line compounds raise syntax error if they are followed by a keyword #22

@mpourmpoulis

Description

@mpourmpoulis

Description

It seems that after single-line compounds, and additional dummy name is added Cause and syntax errors if it is followed by keyword like return or pass. As you can see below assignments are okay!

Your Code

def function():
	if x: return 0
	if x: pass
	if :
		return 1
def function():
	if x: y=4
	x=5

Repair Output

 def function():
	if x:the_dummy_name_is_really_dummy return 0
	if x:the_dummy_name_is_really_dummy pass
	if the_dummy_name_is_really_dummy :
		return 1
def function():
	if x: y=4
	x=5

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions