Skip to content

Commit 6a2b593

Browse files
committed
all: apply gofmt simplify
1 parent 16e9ec3 commit 6a2b593

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

‎compile/compile.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ func (c *compiler) compileFunc(compilerScope compilerScopeType, Ast ast.Ast, Arg
604604
c.makeClosure(newC.Code, args, newC, newC.qualname)
605605

606606
// Call decorators
607-
for_=rangeDecoratorList{
607+
forrangeDecoratorList{
608608
c.OpArg(vm.CALL_FUNCTION, 1) // 1 positional, 0 keyword pair
609609
}
610610
}
@@ -653,7 +653,7 @@ func (c *compiler) class(Ast ast.Ast, class *ast.ClassDef){
653653
c.callHelper(2, class.Bases, class.Keywords, class.Starargs, class.Kwargs)
654654

655655
/* 6. apply decorators */
656-
for_=rangeclass.DecoratorList{
656+
forrangeclass.DecoratorList{
657657
c.OpArg(vm.CALL_FUNCTION, 1) // 1 positional, 0 keyword pair
658658
}
659659

‎parser/y.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ yydefault:
16521652
case130:
16531653
//line grammar.y:946
16541654
{
1655-
yyVAL.aliases= []*ast.Alias{&ast.Alias{Pos: yyVAL.pos, Name: ast.Identifier("*")}}
1655+
yyVAL.aliases= []*ast.Alias{{Pos: yyVAL.pos, Name: ast.Identifier("*")}}
16561656
}
16571657
case131:
16581658
//line grammar.y:950
@@ -2661,7 +2661,7 @@ yydefault:
26612661
yyVAL.call=&ast.Call{}
26622662
test:=yyS[yypt-2].expr
26632663
ifname, ok:=test.(*ast.Name); ok{
2664-
yyVAL.call.Keywords= []*ast.Keyword{&ast.Keyword{Pos: name.Pos, Arg: name.Id, Value: yyS[yypt-0].expr}}
2664+
yyVAL.call.Keywords= []*ast.Keyword{{Pos: name.Pos, Arg: name.Id, Value: yyS[yypt-0].expr}}
26652665
} else{
26662666
yylex.(*yyLex).SyntaxError("keyword can't be an expression")
26672667
}

‎py/string.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (a String) M__imod__(other Object) (Object, error){
388388
// returns end of string if not found
389389
func (sString) pos(nint) int{
390390
characterNumber:=0
391-
fori, _:=ranges{
391+
fori:=ranges{
392392
ifcharacterNumber==n{
393393
returni
394394
}

‎symtable/symtable_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func EqSymbols(t *testing.T, name string, a, b Symbols){
7272
t.Errorf("%s[%s] not found", name, ka)
7373
}
7474
}
75-
forkb, _:=rangeb{
75+
forkb:=rangeb{
7676
if_, ok:=a[kb]; ok{
7777
// Checked already
7878
} else{

‎time/time.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ func init(){
998998
py.MustNewMethod("get_clock_info", time_get_clock_info, 0, get_clock_info_doc),
999999
}
10001000
globals:= py.StringDict{
1001-
//"version": py.Int(MARSHAL_VERSION),
1001+
//"version": py.Int(MARSHAL_VERSION),
10021002
}
10031003
py.NewModule("time", module_doc, methods, globals)
10041004

0 commit comments

Comments
(0)