8000 all: gofmt · peterlee2008/go-python@f203f28 · GitHub
[go: up one dir, main page]

Skip to content

Commit f203f28

Browse files
committed
all: gofmt
1 parent 9db725b commit f203f28

File tree

9 files changed

+27
-13
lines changed

9 files changed

+27
-13
lines changed

dict.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package python
66
//int _gopy_PyDict_Check(PyObject *o) { return PyDict_Check(o); }
77
//int _gopy_PyDict_CheckExact(PyObject *o) { return PyDict_CheckExact(o); }
88
import "C"
9+
910
import (
1011
"errors"
1112
"unsafe"

exceptions.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ int _gopy_PyErr_WarnPy3k(char *message, int stacklevel)
1919
2020
*/
2121
import "C"
22-
import "unsafe"
2322

24-
//import "fmt"
23+
import (
24+
"unsafe"
25+
)
2526

2627
// void PyErr_PrintEx(int set_sys_last_vars)
2728
// Print a standard traceback to sys.stderr and clear the error indicator. Call this function only when the error indicator is set. (Otherwise it will cause a fatal error!)

numeric.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ package python
1717
//int _gopy_PyComplex_Check(PyObject *o) { return PyComplex_Check(o); }
1818
//int _gopy_PyComplex_CheckExact(PyObject *o) { return PyComplex_CheckExact(o); }
1919
import "C"
20-
import "unsafe"
20+
21+
import (
22+
"unsafe"
23+
)
2124

2225
// int PyInt_Check(PyObject *o)
2326
// Return true if o is of type PyInt_Type or a subtype of PyInt_Type.

object.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ package python
99
//{return PyObject_DelAttrString(o,attr_name);}
1010
import "C"
1111

12-
import "unsafe"
13-
import "os"
14-
import "fmt"
12+
import (
13+
"fmt"
14+
"os"
15+
"unsafe"
16+
)
1517

1618
// PyObject layer
1719
type PyObject struct {

otherobjects.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ int _gopy_PyModule_CheckExact(PyObject *p) { return PyModule_CheckExact(p); }
3737
3838
*/
3939
import "C"
40-
import "unsafe"
40+
41+
import (
42+
"unsafe"
43+
)
4144

4245
///// module /////
4346

sequence.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ int _gopy_PyObject_CheckBuffer(PyObject *obj) { return PyObject_CheckBuffer(obj)
3535
3636
*/
3737
import "C"
38-
import "unsafe"
38+
39+
import (
40+
"unsafe"
41+
)
3942

4043
//////// bytearray ////////
4144

type.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ package python
77
//int _gopy_PyType_CheckExact(PyObject *o) { return PyType_CheckExact(o); }
88
import "C"
99

10-
//import "unsafe"
11-
1210
type PyTypeObject struct {
1311
ptr *C.PyTypeObject
1412
}

utilities.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ package python
2222
2323
*/
2424
import "C"
25+
2526
import (
2627
"errors"
28+
"fmt"
2729
"unsafe"
2830
)
2931

30-
import "fmt"
31-
3232
////// Operating System Utilities //////
3333

3434
// int Py_FdIsInteractive(FILE *fp, const char *filename)

veryhigh.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ package python
66
//int _gopy_PyRun_SimpleString(const char *command)
77
//{return PyRun_SimpleString(command);}
88
import "C"
9-
import "unsafe"
9+
10+
import (
11+
"unsafe"
12+
)
1013

1114
// very high level interface
1215

0 commit comments

Comments
 (0)
0