Commit 4c67795e authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

pylint police

parent 5981b046
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@ def brute_force_interpolation(vals, xvals, yvals, x, y):

def make_phase_table(phtab, polyfit=0, ncur=10, nphi=11, pos='p2', threshold=0.2):
    "make phase table"
    #
    #pylint: disable=too-many-locals, too-many-statements
    #FIXME: refactor this
    log = logging.getLogger()

    # data must come in same format
+2 −1
Original line number Diff line number Diff line
@@ -811,7 +811,8 @@ def read_transmission(filename):

def read_diffrun(filename, att_table=None):
    "read nse diffrun file"
    #pylint: disable=too-many-branches
    #pylint: disable=too-many-branches, too-many-statements
    #FIXME: refactor this monstrosity (read_diffrun)
    wavelength  = 0.0
    data_flag   = False
    mon1_flag   = False
+4 −0
Original line number Diff line number Diff line
@@ -105,6 +105,8 @@ class DiffractionWriter(DiffractionScan):

    def save(self, outdir='.'):
        "convert read nexus file to diffrun .dat file"
        #pylint: disable=too-many-statements
        #FIXME: refactor this
        diffrun = self.make_filename(self.info['base'])
        with open(os.path.join(outdir, diffrun), 'wt', encoding='ascii') as fd:
            #
@@ -294,6 +296,8 @@ class EchoWriter(EchoScan):

    def save(self, outdir='.'):
        "convert read nexus file to .echo file"
        #pylint: disable=too-many-statements
        #FIXME: refactor this
        echofile = self.make_filename(self.info['base'])
        with open(os.path.join(outdir, echofile), 'wt', encoding='ascii') as fd:
            #
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ def plot_single_echo(ax, data, nptr, **kwargs):
def plot_center_echo(hdfile, **kwargs):
    "echo plot"
    #
    #pylint: disable=too-many-locals, too-many-statements
    #FIXME: refactor this monster
    only_echo       = kwargs.get('only_echo', False)
    resolution_plot = kwargs.get('resolution_plot', False) # implies -C
    savefile        = kwargs.get('savefile', None)
+0 −1
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ def action_detimage(filenames, **kwargs):
    savefig       = kwargs.pop('savefig')
    for fname in filenames:
        try:
            base = os.path.basename(fname)
            plot_detimage(fname, **kwargs)
        except (OSError, RuntimeError) as e:
            logging.getLogger().error("%s",e)
Loading