Ignore:
Timestamp:
Apr 9, 2017 4:30:10 AM (8 years ago)
Author:
andyfaff
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
fca1f50
Parents:
7432acb
git-author:
Andrew Nelson <andyfaff@…> (04/09/17 04:26:55)
git-committer:
Andrew Nelson <andyfaff@…> (04/09/17 04:30:10)
Message:

MAINT: more 'not x is None' fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)) 
Note: See TracChangeset for help on using the changeset viewer.