Ignore:
Timestamp:
Apr 9, 2017 4:11:31 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:
45dffa69
Parents:
ac07a3a
Message:

MAINT: search+replace '!= None' by 'is not None'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitting.py

    r235f514 r7432acb  
    302302        Make new model 
    303303        """ 
    304         if self.new_model_frame != None: 
     304        if self.new_model_frame is not None: 
    305305            self.new_model_frame.Show(False) 
    306306            self.new_model_frame.Show(True) 
     
    441441            wx.PostEvent(self.parent, StatusEvent(status=msg)) 
    442442 
    443         if page != None: 
     443        if page is not None: 
    444444            return set_focus_page(page) 
    445445        if caption == "Const & Simul Fit": 
     
    634634            state = self.temp_state[self.state_index] 
    635635            #panel state should have model selection to set_state 
    636             if state.formfactorcombobox != None: 
     636            if state.formfactorcombobox is not None: 
    637637                #set state 
    638638                data = self.parent.create_gui_data(state.data) 
     
    10161016                return False 
    10171017        ## If a thread is already started, stop it 
    1018         #if self.calc_fit!= None and self.calc_fit.isrunning(): 
     1018        #if self.calc_fitis not None and self.calc_fit.isrunning(): 
    10191019        #    self.calc_fit.stop() 
    10201020        msg = "Fitting is in progress..." 
     
    11061106            page = self.fit_panel.add_empty_page() 
    11071107            # add data associated to the page created 
    1108             if page != None: 
     1108            if page is not None: 
    11091109                evt = StatusEvent(status="Page Created", info="info") 
    11101110                wx.PostEvent(self.parent, evt) 
     
    12161216            for item in param: 
    12171217                ## check if constraint 
    1218                 if item[0] != None and item[1] != None: 
     1218                if item[0] is not None and item[1] is not None: 
    12191219                    listOfConstraint.append((item[0], item[1])) 
    12201220        new_model = model 
     
    14571457        cell.value = index 
    14581458 
    1459         if theory_data != None: 
     1459        if theory_data is not None: 
    14601460            #Suucessful fit 
    14611461            theory_data.id = wx.NewId() 
     
    15441544                    #(CallAfter is important to MAC) 
    15451545                    try: 
    1546                         #if res != None: 
     1546                        #if res is not None: 
    15471547                        wx.CallAfter(cpage.onsetValues, res.fitness, 
    15481548                                     res.param_list, 
     
    20102010            if index is None: 
    20112011                index = np.ones(len(data_copy.data), dtype=bool) 
    2012             if weight != None: 
     2012            if weight is not None: 
    20132013                data_copy.err_data = weight 
    20142014            # get rid of zero error points 
     
    20252025            if index is None: 
    20262026                index = np.ones(len(data_copy.y), dtype=bool) 
    2027             if weight != None: 
     2027            if weight is not None: 
    20282028                data_copy.dy = weight 
    20292029            if data_copy.dy is None or data_copy.dy == []: 
Note: See TracChangeset for help on using the changeset viewer.