Changeset 45dffa69 in sasview


Ignore:
Timestamp:
Apr 9, 2017 6:30:10 AM (8 months ago)
Author:
andyfaff
Branches:
master, ESS_GUI, ESS_GUI_CategroyManager, ESS_GUI_Pr, ESS_GUI_cns, ESS_GUI_corf, ESS_GUI_py2_OLD, SVCC-1, SasView-664, costrafo411, docs, ticket-873, ticket-976, ticket-993, unittest-saveload
Children:
04669d3
Parents:
7432acb
git-author:
Andrew Nelson <andyfaff@…> (04/09/17 06:26:55)
git-committer:
Andrew Nelson <andyfaff@…> (04/09/17 06:30:10)
Message:

MAINT: more 'not x is None' fixes

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/pr/invertor.py

    rac07a3a r45dffa69  
    658658            file.write("#has_bck=0\n") 
    659659        file.write("#alpha_estimate=%g\n" % self.suggested_alpha) 
    660         if not self.out is None: 
     660        if self.out is not None: 
    661661            if len(self.out) == len(self.cov): 
    662662                for i in range(len(self.out)): 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py

    r7432acb r45dffa69  
    269269        Erase new mask from old mask 
    270270        """ 
    271         if not self.slicer is None: 
     271        if self.slicer is not None: 
    272272            self.slicer_mask = self.slicer.update() 
    273273            mask = self.data.mask 
     
    307307        Clear the slicer on the plot 
    308308        """ 
    309         if not self.slicer is None: 
     309        if self.slicer is not None: 
    310310            self.slicer.clear() 
    311311            self.subplot.figure.canvas.draw() 
  • src/sas/sasgui/plottools/plottable_interactor.py

    r7432acb r45dffa69  
    100100        """ 
    101101        """ 
    102         if not self.marker is None: 
     102        if self.marker is not None: 
    103103            self.base.connect.clear([self.marker]) 
    104104        self.color = self._color(color) 
     
    115115        """ 
    116116        """ 
    117         if not self.marker is None: 
     117        if self.marker is not None: 
    118118            self.base.connect.clear([self.marker]) 
    119119        self.color = self._color(color) 
     
    133133        """ 
    134134        """ 
    135         if not self.marker is None: 
     135        if self.marker is not None: 
    136136            self.base.connect.clear([self.marker]) 
    137137        self.color = self._color(color) 
  • src/sas/sasgui/plottools/plottables.py

    r7432acb r45dffa69  
    562562        Returns True if there is no data stored in the plottable 
    563563        """ 
    564         if not self.x is None and len(self.x) == 0 \ 
    565             and not self.y is None and len(self.y) == 0: 
     564        if (self.x is not None and len(self.x) == 0 
     565            and self.y is not None and len(self.y) == 0): 
    566566            return True 
    567567        return False 
     
    683683 
    684684        if(x is not None) and (y is not None): 
    685             if not dx is None and not len(dx) == 0 and not len(x) == len(dx): 
     685            if dx is not None and not len(dx) == 0 and not len(x) == len(dx): 
    686686                msg = "Plottable.View: Given x and dx are not" 
    687687                msg += " of the same length" 
     
    693693                raise ValueError, msg 
    694694 
    695             if not dy is None and not len(dy) == 0 and not len(y) == len(dy): 
     695            if dy is not None and not len(dy) == 0 and not len(y) == len(dy): 
    696696                msg = "Plottable.View: Given y and dy are not of the same " 
    697697                msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy)) 
  • test/sasrealspace/test/utest_realspace.py

    rac07a3a r45dffa69  
    332332        self.canvas.setParam('%s.radius' % handle2, self.radius) 
    333333        self.canvas.setParam('%s.contrast' % handle2, 1.0) 
    334         if not order2 is None: 
     334        if order2 is not None: 
    335335            self.canvas.setParam('%s.order' % handle2, order2) 
    336336                
Note: See TracChangeset for help on using the changeset viewer.