summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2016-03-30 12:30:47 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2016-03-31 15:08:08 -0700
commit01855d5bc5bcc554d3456355bbd9228e58b4fdd7 (patch)
tree01f7dcb06b00fcda59289165a90db3fb469135fe
parent9076e049340db0c55f57abb4ee9bbaffba61d45d (diff)
glapi: clean imports in python files
Completely clean the imports: - Split so that one module is imported per line - Remove unused imports - Group stdlib imports, then 3rd party modules, and finally local modules - sort alphabetically within those groups Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r--src/mapi/glapi/gen/glX_XML.py1
-rw-r--r--src/mapi/glapi/gen/glX_proto_common.py4
-rw-r--r--src/mapi/glapi/gen/glX_proto_recv.py4
-rw-r--r--src/mapi/glapi/gen/glX_proto_send.py9
-rw-r--r--src/mapi/glapi/gen/glX_proto_size.py5
-rw-r--r--src/mapi/glapi/gen/glX_server_table.py5
-rw-r--r--src/mapi/glapi/gen/gl_SPARC_asm.py3
-rw-r--r--src/mapi/glapi/gen/gl_XML.py8
-rw-r--r--src/mapi/glapi/gen/gl_apitemp.py3
-rw-r--r--src/mapi/glapi/gen/gl_enums.py7
-rw-r--r--src/mapi/glapi/gen/gl_genexec.py6
-rw-r--r--src/mapi/glapi/gen/gl_gentable.py3
-rw-r--r--src/mapi/glapi/gen/gl_x86-64_asm.py3
-rw-r--r--src/mapi/glapi/gen/gl_x86_asm.py3
-rw-r--r--src/mapi/glapi/gen/remap_helper.py2
-rw-r--r--src/mapi/glapi/gen/typeexpr.py4
16 files changed, 45 insertions, 25 deletions
diff --git a/src/mapi/glapi/gen/glX_XML.py b/src/mapi/glapi/gen/glX_XML.py
index 12ff291fc1..6987e27ee0 100644
--- a/src/mapi/glapi/gen/glX_XML.py
+++ b/src/mapi/glapi/gen/glX_XML.py
@@ -27,7 +27,6 @@
import gl_XML
import license
-import sys, getopt, string
class glx_item_factory(gl_XML.gl_item_factory):
diff --git a/src/mapi/glapi/gen/glX_proto_common.py b/src/mapi/glapi/gen/glX_proto_common.py
index ae2c2d5811..bcfe00904a 100644
--- a/src/mapi/glapi/gen/glX_proto_common.py
+++ b/src/mapi/glapi/gen/glX_proto_common.py
@@ -25,9 +25,11 @@
# Authors:
# Ian Romanick <idr@us.ibm.com>
-import gl_XML, glX_XML
import string
+import gl_XML
+import glX_XML
+
class glx_proto_item_factory(glX_XML.glx_item_factory):
"""Factory to create GLX protocol oriented objects derived from gl_item."""
diff --git a/src/mapi/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py
index afee388225..ec3f7d7838 100644
--- a/src/mapi/glapi/gen/glX_proto_recv.py
+++ b/src/mapi/glapi/gen/glX_proto_recv.py
@@ -28,7 +28,9 @@
import argparse
import string
-import gl_XML, glX_XML, glX_proto_common, license
+import glX_proto_common
+import gl_XML
+import license
class PrintGlxDispatch_h(gl_XML.gl_print_base):
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
index 2b3303078a..5904b338f1 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -28,9 +28,14 @@
# Jeremy Kolb <jkolb@brandeis.edu>
import argparse
+import copy
+import string
+
+import gl_XML
+import glX_XML
+import glX_proto_common
+import license
-import gl_XML, glX_XML, glX_proto_common, license
-import copy, string
def convertStringForXCB(str):
tmp = ""
diff --git a/src/mapi/glapi/gen/glX_proto_size.py b/src/mapi/glapi/gen/glX_proto_size.py
index 75fc26f5db..b008e9dae1 100644
--- a/src/mapi/glapi/gen/glX_proto_size.py
+++ b/src/mapi/glapi/gen/glX_proto_size.py
@@ -26,9 +26,10 @@
# Ian Romanick <idr@us.ibm.com>
import argparse
-import sys, string
+import string
-import gl_XML, glX_XML
+import glX_XML
+import gl_XML
import license
diff --git a/src/mapi/glapi/gen/glX_server_table.py b/src/mapi/glapi/gen/glX_server_table.py
index 2d21f4e4ee..5e996eb5c2 100644
--- a/src/mapi/glapi/gen/glX_server_table.py
+++ b/src/mapi/glapi/gen/glX_server_table.py
@@ -27,7 +27,10 @@
import argparse
-import gl_XML, glX_XML, glX_proto_common, license
+import glX_XML
+import glX_proto_common
+import gl_XML
+import license
def log2(value):
diff --git a/src/mapi/glapi/gen/gl_SPARC_asm.py b/src/mapi/glapi/gen/gl_SPARC_asm.py
index fa6217e1b8..89bccef68d 100644
--- a/src/mapi/glapi/gen/gl_SPARC_asm.py
+++ b/src/mapi/glapi/gen/gl_SPARC_asm.py
@@ -27,8 +27,9 @@
import argparse
+import glX_XML
+import gl_XML
import license
-import gl_XML, glX_XML
class PrintGenericStubs(gl_XML.gl_print_base):
def __init__(self):
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
index 2e7123ec40..8c622aa5b7 100644
--- a/src/mapi/glapi/gen/gl_XML.py
+++ b/src/mapi/glapi/gen/gl_XML.py
@@ -26,11 +26,13 @@
# Ian Romanick <idr@us.ibm.com>
from decimal import Decimal
-import xml.etree.ElementTree as ET
-import re, sys, string
import os.path
-import typeexpr
+import re
+import string
+import xml.etree.ElementTree as ET
+
import static_data
+import typeexpr
def parse_GL_API( file_name, factory = None ):
diff --git a/src/mapi/glapi/gen/gl_apitemp.py b/src/mapi/glapi/gen/gl_apitemp.py
index 5e985a2eca..50a599a85e 100644
--- a/src/mapi/glapi/gen/gl_apitemp.py
+++ b/src/mapi/glapi/gen/gl_apitemp.py
@@ -27,7 +27,8 @@
import argparse
-import gl_XML, glX_XML
+import glX_XML
+import gl_XML
import license
class PrintGlOffsets(gl_XML.gl_print_base):
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 62cc1b3630..49cc0bda63 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -27,12 +27,11 @@
# Zack Rusin <zack@kde.org>
import argparse
+import re
+import xml.etree.ElementTree as ET
-import license
import gl_XML
-import xml.etree.ElementTree as ET
-import sys, getopt
-import re
+import license
class PrintGlEnums(gl_XML.gl_print_base):
diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py
index 72d7b6fea1..4f86bcff78 100644
--- a/src/mapi/glapi/gen/gl_genexec.py
+++ b/src/mapi/glapi/gen/gl_genexec.py
@@ -27,10 +27,10 @@
import argparse
import collections
-import license
-import gl_XML
-import sys
+
import apiexec
+import gl_XML
+import license
exec_flavor_map = {
diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
index 7cd475aa2b..3ca89cdbcd 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -32,8 +32,9 @@
import argparse
+import glX_XML
+import gl_XML
import license
-import gl_XML, glX_XML
header = """/* GLXEXT is the define used in the xserver when the GLX extension is being
* built. Hijack this to determine whether this file is being built for the
diff --git a/src/mapi/glapi/gen/gl_x86-64_asm.py b/src/mapi/glapi/gen/gl_x86-64_asm.py
index dcd113e268..d367feb89f 100644
--- a/src/mapi/glapi/gen/gl_x86-64_asm.py
+++ b/src/mapi/glapi/gen/gl_x86-64_asm.py
@@ -28,8 +28,9 @@
import argparse
import copy
+import glX_XML
+import gl_XML
import license
-import gl_XML, glX_XML
def should_use_push(registers):
for [reg, offset] in registers:
diff --git a/src/mapi/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py
index c0c7941ce1..1a0c0f45a4 100644
--- a/src/mapi/glapi/gen/gl_x86_asm.py
+++ b/src/mapi/glapi/gen/gl_x86_asm.py
@@ -27,8 +27,9 @@
import argparse
+import glX_XML
+import gl_XML
import license
-import gl_XML, glX_XML
class PrintGenericStubs(gl_XML.gl_print_base):
diff --git a/src/mapi/glapi/gen/remap_helper.py b/src/mapi/glapi/gen/remap_helper.py
index edc6c3e14b..31a6fe44ae 100644
--- a/src/mapi/glapi/gen/remap_helper.py
+++ b/src/mapi/glapi/gen/remap_helper.py
@@ -26,8 +26,8 @@
import argparse
-import license
import gl_XML
+import license
def get_function_spec(func):
diff --git a/src/mapi/glapi/gen/typeexpr.py b/src/mapi/glapi/gen/typeexpr.py
index ed23d23ff8..af48fee131 100644
--- a/src/mapi/glapi/gen/typeexpr.py
+++ b/src/mapi/glapi/gen/typeexpr.py
@@ -25,7 +25,9 @@
# Authors:
# Ian Romanick <idr@us.ibm.com>
-import string, copy
+import copy
+import string
+
class type_node(object):
def __init__(self):