Ignore:
Timestamp:
Apr 9, 2017 5: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/perspectives/calculator/data_operator.py

    r959eb01 r235f514  
    198198        self.send_warnings('') 
    199199        msg = '' 
    200         if name == None: 
     200        if name is None: 
    201201            text = self.data_namectr.GetValue().strip() 
    202202        else: 
     
    205205        name_list = [] 
    206206        for state in state_list: 
    207             if state.data == None: 
     207            if state.data is None: 
    208208                theory_list = state.get_theory() 
    209209                theory, _ = theory_list.values()[0] 
     
    278278        pos = item.GetCurrentSelection() 
    279279        data = item.GetClientData(pos) 
    280         if data == None: 
     280        if data is None: 
    281281            content = "?" 
    282282            self.put_text_pic(self.data1_pic, content) 
     
    313313        content = "?" 
    314314        if not (self.numberctr.IsShown() and self.numberctr.IsEnabled()): 
    315             if data == None: 
     315            if data is None: 
    316316                content = "?" 
    317317                self.put_text_pic(self.data2_pic, content) 
     
    355355        pos1 = self.data1_cbox.GetCurrentSelection() 
    356356        data1 = self.data1_cbox.GetClientData(pos1) 
    357         if data1 == None: 
     357        if data1 is None: 
    358358            self.output = None 
    359359            return flag 
     
    361361        data2 = self.data2_cbox.GetClientData(pos2) 
    362362 
    363         if data2 == None: 
     363        if data2 is None: 
    364364            self.output = None 
    365365            return flag 
     
    422422        """ 
    423423        out = self.out_pic 
    424         if output == None: 
     424        if output is None: 
    425425            content = "?" 
    426426            self.put_text_pic(out, content) 
     
    592592        name_list = [] 
    593593        for state in state_list: 
    594             if state.data == None: 
     594            if state.data is None: 
    595595                theory_list = state.get_theory() 
    596596                theory, _ = theory_list.values()[0] 
     
    609609            wx.MessageBox(msg, 'Error') 
    610610            return 
    611         if self.output == None: 
     611        if self.output is None: 
    612612            msg = "No Output Data has been generated...   " 
    613613            wx.MessageBox(msg, 'Error') 
Note: See TracChangeset for help on using the changeset viewer.