Ignore:
Timestamp:
Apr 9, 2017 3:46:10 AM (7 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:
ac07a3a
Parents:
5b2b04d
Message:

MAINT: replace '== None' by 'is None'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/dataFitting.py

    r959eb01 r235f514  
    7878        result.clone_without_data(length=len(self.x), clone=self) 
    7979        result.copy_from_datainfo(data1d=self) 
    80         if self.dxw == None: 
     80        if self.dxw is None: 
    8181            result.dxw = None 
    8282        else: 
    8383            result.dxw = np.zeros(len(self.x)) 
    84         if self.dxl == None: 
     84        if self.dxl is None: 
    8585            result.dxl = None 
    8686        else: 
     
    125125        tot_length = len(self.x) + len(other.x) 
    126126        result = self.clone_without_data(length=tot_length, clone=result) 
    127         if self.dlam == None or other.dlam is None: 
     127        if self.dlam is None or other.dlam is None: 
    128128            result.dlam = None 
    129129        else: 
    130130            result.dlam = np.zeros(tot_length) 
    131         if self.dy == None or other.dy is None: 
     131        if self.dy is None or other.dy is None: 
    132132            result.dy = None 
    133133        else: 
    134134            result.dy = np.zeros(tot_length) 
    135         if self.dx == None or other.dx is None: 
     135        if self.dx is None or other.dx is None: 
    136136            result.dx = None 
    137137        else: 
    138138            result.dx = np.zeros(tot_length) 
    139         if self.dxw == None or other.dxw is None: 
     139        if self.dxw is None or other.dxw is None: 
    140140            result.dxw = None 
    141141        else: 
    142142            result.dxw = np.zeros(tot_length) 
    143         if self.dxl == None or other.dxl is None: 
     143        if self.dxl is None or other.dxl is None: 
    144144            result.dxl = None 
    145145        else: 
     
    227227        result = self.clone_without_data(len(self.x)) 
    228228        result.copy_from_datainfo(data1d=self) 
    229         if self.dxw == None: 
     229        if self.dxw is None: 
    230230            result.dxw = None 
    231231        else: 
    232232            result.dxw = np.zeros(len(self.x)) 
    233         if self.dxl == None: 
     233        if self.dxl is None: 
    234234            result.dxl = None 
    235235        else: 
     
    279279        tot_length = len(self.x)+len(other.x) 
    280280        result.clone_without_data(length=tot_length, clone=self) 
    281         if self.dlam == None or other.dlam is None: 
     281        if self.dlam is None or other.dlam is None: 
    282282            result.dlam = None 
    283283        else: 
    284284            result.dlam = np.zeros(tot_length) 
    285         if self.dy == None or other.dy is None: 
     285        if self.dy is None or other.dy is None: 
    286286            result.dy = None 
    287287        else: 
    288288            result.dy = np.zeros(tot_length) 
    289         if self.dx == None or other.dx is None: 
     289        if self.dx is None or other.dx is None: 
    290290            result.dx = None 
    291291        else: 
    292292            result.dx = np.zeros(tot_length) 
    293         if self.dxw == None or other.dxw is None: 
     293        if self.dxw is None or other.dxw is None: 
    294294            result.dxw = None 
    295295        else: 
    296296            result.dxw = np.zeros(tot_length) 
    297         if self.dxl == None or other.dxl is None: 
     297        if self.dxl is None or other.dxl is None: 
    298298            result.dxl = None 
    299299        else: 
     
    405405        result.ymin = self.ymin 
    406406        result.ymax = self.ymax 
    407         if self.dqx_data == None or self.dqy_data == None: 
     407        if self.dqx_data is None or self.dqy_data is None: 
    408408            result.dqx_data = None 
    409409            result.dqy_data = None 
     
    468468        result.ymin = self.ymin 
    469469        result.ymax = self.ymax 
    470         if self.dqx_data == None or self.dqy_data == None or \ 
    471                 other.dqx_data == None or other.dqy_data == None : 
     470        if self.dqx_data is None or self.dqy_data is None or \ 
     471                other.dqx_data is None or other.dqy_data is None : 
    472472            result.dqx_data = None 
    473473            result.dqy_data = None 
Note: See TracChangeset for help on using the changeset viewer.