Index: extra/pylint.rc
===================================================================
--- extra/pylint.rc	(revision a1564199bd7012cda128baf89373917d7677ae7b)
+++ extra/pylint.rc	(revision c85db69ebc61ae093eb2e72b7a6bf64a0142d56d)
@@ -57,5 +57,5 @@
 
 # Disable the message(s) with the given id(s).
-disable=W0702,W0613
+disable=W0702,W0613,W0703
 
 [REPORTS]
@@ -343,5 +343,5 @@
 
 # Minimum number of public methods for a class (see R0903).
-min-public-methods=2
+min-public-methods=0
 
 # Maximum number of public methods for a class (see R0904).
Index: sasmodels/kernelcl.py
===================================================================
--- sasmodels/kernelcl.py	(revision 664c8e7c9b7f15e584d3dee365484f8ac74ae4d5)
+++ sasmodels/kernelcl.py	(revision c85db69ebc61ae093eb2e72b7a6bf64a0142d56d)
@@ -32,5 +32,5 @@
     context = cl.create_some_context(interactive=False)
     del context
-except Exception,exc:
+except Exception, exc:
     warnings.warn(str(exc))
     raise RuntimeError("OpenCL not available")
@@ -39,5 +39,5 @@
 
 from . import generate
-from .kernelpy import PyInput, PyModel
+from .kernelpy import PyModel
 
 F64_DEFS = """\
@@ -63,5 +63,5 @@
     """
     source, info = generate.make(kernel_module)
-    if callable(info.get('Iq',None)):
+    if callable(info.get('Iq', None)):
         return PyModel(info)
     ## for debugging, save source to a .cl file, edit it, and reload as model
@@ -110,8 +110,8 @@
     device.min_data_type_align_size//4.
     """
-    remainder = vector.size%boundary
+    remainder = vector.size % boundary
     if remainder != 0:
         size = vector.size + (boundary - remainder)
-        vector = np.hstack((vector, [extra]*(size-vector.size)))
+        vector = np.hstack((vector, [extra] * (size - vector.size)))
     return np.ascontiguousarray(vector, dtype=dtype)
 
@@ -126,5 +126,5 @@
     """
     dtype = np.dtype(dtype)
-    if dtype==generate.F64 and not all(has_double(d) for d in context.devices):
+    if dtype == generate.F64 and not all(has_double(d) for d in context.devices):
         raise RuntimeError("Double precision not supported for devices")
 
@@ -135,5 +135,5 @@
     if context.devices[0].type == cl.device_type.GPU:
         header += "#define USE_SINCOS\n"
-    program  = cl.Program(context, header+source).build()
+    program = cl.Program(context, header + source).build()
     return program
 
@@ -173,5 +173,5 @@
         try:
             self.context = cl.create_some_context(interactive=False)
-        except Exception,exc:
+        except Exception, exc:
             warnings.warn(str(exc))
             warnings.warn("pyopencl.create_some_context() failed")
@@ -230,12 +230,12 @@
         self.__dict__ = state.copy()
 
-    def __call__(self, input):
-        if self.dtype != input.dtype:
+    def __call__(self, input_value):
+        if self.dtype != input_value.dtype:
             raise TypeError("data and kernel have different types")
         if self.program is None:
-            self.program = environment().compile_program(self.info['name'],self.source, self.dtype)
-        kernel_name = generate.kernel_name(self.info, input.is_2D)
+            self.program = environment().compile_program(self.info['name'], self.source, self.dtype)
+        kernel_name = generate.kernel_name(self.info, input_value.is_2D)
         kernel = getattr(self.program, kernel_name)
-        return GpuKernel(kernel, self.info, input)
+        return GpuKernel(kernel, self.info, input_value)
 
     def release(self):
@@ -285,5 +285,5 @@
         self.q_vectors = [_stretch_input(q, self.dtype, 32) for q in q_vectors]
         self.q_buffers = [
-            cl.Buffer(env.context,  mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=q)
+            cl.Buffer(env.context, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=q)
             for q in self.q_vectors
         ]
@@ -320,6 +320,6 @@
         self.res = np.empty(input.nq, input.dtype)
         dim = '2d' if input.is_2D else '1d'
-        self.fixed_pars = info['partype']['fixed-'+dim]
-        self.pd_pars = info['partype']['pd-'+dim]
+        self.fixed_pars = info['partype']['fixed-' + dim]
+        self.pd_pars = info['partype']['pd-' + dim]
 
         # Inputs and outputs for each kernel call
@@ -327,8 +327,8 @@
         env = environment()
         self.loops_b = [cl.Buffer(env.context, mf.READ_WRITE,
-                                  2*MAX_LOOPS*input.dtype.itemsize)
+                                  2 * MAX_LOOPS * input.dtype.itemsize)
                         for _ in env.queues]
         self.res_b = [cl.Buffer(env.context, mf.READ_WRITE,
-                                input.global_size[0]*input.dtype.itemsize)
+                                input.global_size[0] * input.dtype.itemsize)
                       for _ in env.queues]
 
@@ -344,5 +344,5 @@
             cutoff = real(cutoff)
             loops_N = [np.uint32(len(p[0])) for p in pd_pars]
-            loops = np.hstack(pd_pars) if pd_pars else np.empty(0,dtype=self.input.dtype)
+            loops = np.hstack(pd_pars) if pd_pars else np.empty(0, dtype=self.input.dtype)
             loops = np.ascontiguousarray(loops.T, self.input.dtype).flatten()
             #print "loops",Nloops, loops
@@ -350,5 +350,5 @@
             #import sys; print >>sys.stderr,"opencl eval",pars
             #print "opencl eval",pars
-            if len(loops) > 2*MAX_LOOPS:
+            if len(loops) > 2 * MAX_LOOPS:
                 raise ValueError("too many polydispersity points")
 
Index: sasmodels/kernelpy.py
===================================================================
--- sasmodels/kernelpy.py	(revision f734e7d992ea6f2199f478553447ff0dbe047559)
+++ sasmodels/kernelpy.py	(revision c85db69ebc61ae093eb2e72b7a6bf64a0142d56d)
@@ -1,13 +1,13 @@
 import numpy as np
-from numpy import pi, sin, cos, sqrt
-
-from .generate import F32, F64
+from numpy import pi, cos
+
+from .generate import F64
 
 class PyModel(object):
     def __init__(self, info):
         self.info = info
-    def __call__(self, input):
-        kernel = self.info['Iqxy'] if input.is_2D else self.info['Iq']
-        return PyKernel(kernel, self.info, input)
+    def __call__(self, input_value):
+        kernel = self.info['Iqxy'] if input_value.is_2D else self.info['Iq']
+        return PyKernel(kernel, self.info, input_value)
     def make_input(self, q_vectors):
         return PyInput(q_vectors, dtype=F64)
@@ -38,5 +38,5 @@
         self.dtype = dtype
         self.is_2D = (len(q_vectors) == 2)
-        self.q_vectors = [np.ascontiguousarray(q,self.dtype) for q in q_vectors]
+        self.q_vectors = [np.ascontiguousarray(q, self.dtype) for q in q_vectors]
         self.q_pointers = [q.ctypes.data for q in q_vectors]
 
@@ -73,13 +73,13 @@
             if dim == '2d':
                 def vector_kernel(qx, qy, *args):
-                    return np.array([kernel(qxi,qyi,*args) for qxi,qyi in zip(qx,qy)])
+                    return np.array([kernel(qxi, qyi, *args) for qxi, qyi in zip(qx, qy)])
             else:
                 def vector_kernel(q, *args):
-                    return np.array([kernel(qi,*args) for qi in q])
+                    return np.array([kernel(qi, *args) for qi in q])
             self.kernel = vector_kernel
         else:
             self.kernel = kernel
-        fixed_pars = info['partype']['fixed-'+dim]
-        pd_pars = info['partype']['pd-'+dim]
+        fixed_pars = info['partype']['fixed-' + dim]
+        pd_pars = info['partype']['pd-' + dim]
         vol_pars = info['partype']['volume']
 
@@ -87,9 +87,9 @@
         pars = [p[0] for p in info['parameters'][2:]]
         offset = len(self.input.q_vectors)
-        self.args = self.input.q_vectors + [None]*len(pars)
-        self.fixed_index = np.array([pars.index(p)+offset for p in fixed_pars[2:] ])
-        self.pd_index = np.array([pars.index(p)+offset for p in pd_pars])
-        self.vol_index = np.array([pars.index(p)+offset for p in vol_pars])
-        try: self.theta_index = pars.index('theta')+offset
+        self.args = self.input.q_vectors + [None] * len(pars)
+        self.fixed_index = np.array([pars.index(p) + offset for p in fixed_pars[2:]])
+        self.pd_index = np.array([pars.index(p) + offset for p in pd_pars])
+        self.vol_index = np.array([pars.index(p) + offset for p in vol_pars])
+        try: self.theta_index = pars.index('theta') + offset
         except ValueError: self.theta_index = -1
 
@@ -105,7 +105,7 @@
         # First two fixed
         scale, background = fixed[:2]
-        for index,value in zip(self.fixed_index, fixed[2:]):
+        for index, value in zip(self.fixed_index, fixed[2:]):
             args[index] = float(value)
-        res = _loops(form, form_volume, cutoff, scale, background,  args,
+        res = _loops(form, form_volume, cutoff, scale, background, args,
                      pd, self.pd_index, self.vol_index, self.theta_index)
 
@@ -185,8 +185,8 @@
     for k in range(stride[-1]):
         # update polydispersity parameter values
-        fast_index = k%stride[0]
+        fast_index = k % stride[0]
         if fast_index == 0:  # bottom loop complete ... check all other loops
             if weight.size > 0:
-                for i,index, in enumerate(k%stride):
+                for i, index, in enumerate(k % stride):
                     args[pd_index[i]] = pd[i][0][index]
                     weight[i] = pd[i][1][index]
@@ -202,13 +202,13 @@
         if w > cutoff:
             I = form(*args)
-            positive = (I>=0.0)
+            positive = (I >= 0.0)
 
             # Note: can precompute spherical correction if theta_index is not the fast index
             # Correction factor for spherical integration p(theta) I(q) sin(theta) dtheta
             #spherical_correction = abs(sin(pi*args[theta_index])) if theta_index>=0 else 1.0
-            spherical_correction = abs(cos(pi*args[theta_index]))*pi/2 if theta_index>=0 else 1.0
+            spherical_correction = abs(cos(pi * args[theta_index])) * pi / 2 if theta_index >= 0 else 1.0
             #spherical_correction = 1.0
-            ret += w*I*spherical_correction*positive
-            norm += w*positive
+            ret += w * I * spherical_correction * positive
+            norm += w * positive
 
             # Volume normalization.
@@ -220,9 +220,9 @@
                 vol_args = [args[index] for index in vol_index]
                 vol_weight = np.prod(weight[vol_weight_index])
-                vol += vol_weight*form_volume(*vol_args)*positive
-                vol_norm += vol_weight*positive
-
-    positive = (vol*vol_norm != 0.0)
+                vol += vol_weight * form_volume(*vol_args) * positive
+                vol_norm += vol_weight * positive
+
+    positive = (vol * vol_norm != 0.0)
     ret[positive] *= vol_norm[positive] / vol[positive]
-    result = scale*ret/norm+background
+    result = scale * ret / norm + background
     return result
