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

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

Location:
src/sas/sasgui/perspectives/invariant
Files:
3 edited

Legend:

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

    r959eb01 r7432acb  
    331331        new_plot.title = self.__data.title 
    332332        # Save theory_data in a state 
    333         if data != None: 
     333        if data is not None: 
    334334            name_head = name.split('-') 
    335335            if name_head[0] == 'Low': 
     
    353353 
    354354        # Save data in a state: but seems to never happen 
    355         if new_plot != None: 
     355        if new_plot is not None: 
    356356            self.invariant_panel.state.data = copy.deepcopy(new_plot) 
    357357        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 
  • src/sas/sasgui/perspectives/invariant/invariant_panel.py

    r235f514 r7432acb  
    609609            wx.PostEvent(self.parent, StatusEvent(status=msg)) 
    610610        # set a state for this computation for saving 
    611         elif event != None: 
     611        elif event is not None: 
    612612            self._set_compute_state(state='compute') 
    613613            self._set_bookmark_flag(True) 
     
    718718        self._set_preview_flag(True) 
    719719 
    720         if event != None: 
     720        if event is not None: 
    721721            self._set_preview_flag(True) 
    722722            self._set_save_flag(True) 
     
    10221022        self.state.saved_state['state_num'] = 0 
    10231023        self.state.saved_state['compute_num'] = 0 
    1024         if self._data != None: 
     1024        if self._data is not None: 
    10251025            self.state.saved_state['file'] = str(self._data.name) 
    10261026        else: 
     
    12441244        # Ask the user the location of the file to write to. 
    12451245        path = None 
    1246         if self.parent != None: 
     1246        if self.parent is not None: 
    12471247            self._default_save_location = self.parent.get_save_location() 
    12481248        if self._default_save_location is None: 
     
    12541254            path = dlg.GetPath() 
    12551255            self._default_save_location = os.path.dirname(path) 
    1256             if self.parent != None: 
     1256            if self.parent is not None: 
    12571257                self.parent._default_save_location = \ 
    12581258                    self._default_save_location 
     
    13931393        Enable and disable the power value editing 
    13941394        """ 
    1395         if event != None: 
     1395        if event is not None: 
    13961396            self._set_bookmark_flag(True) 
    13971397            self._set_preview_flag(False) 
     
    14111411        Disable or enable some button if the user enable low q extrapolation 
    14121412        """ 
    1413         if event != None: 
     1413        if event is not None: 
    14141414            self._set_bookmark_flag(True) 
    14151415            self._set_preview_flag(False) 
     
    14381438        Enable editing power law section at low q range 
    14391439        """ 
    1440         if event != None: 
     1440        if event is not None: 
    14411441            self._set_bookmark_flag(True) 
    14421442            self._set_preview_flag(False) 
     
    15371537        Enable and disable the power value editing 
    15381538        """ 
    1539         if event != None: 
     1539        if event is not None: 
    15401540            self._set_bookmark_flag(True) 
    15411541 
     
    15541554        Disable or enable some button if the user enable high q extrapolation 
    15551555        """ 
    1556         if event != None: 
     1556        if event is not None: 
    15571557            self._set_bookmark_flag(True) 
    15581558            self._set_preview_flag(False) 
  • src/sas/sasgui/perspectives/invariant/invariant_state.py

    r235f514 r7432acb  
    281281        # File name 
    282282        element = newdoc.createElement("filename") 
    283         if self.file != None and self.file != '': 
     283        if self.file is not None and self.file != '': 
    284284            element.appendChild(newdoc.createTextNode(str(self.file))) 
    285285        else: 
     
    734734                    # invstate could be None when .svs file is loaded 
    735735                    # in this case, skip appending to output 
    736                     if invstate != None: 
     736                    if invstate is not None: 
    737737                        sas_entry.meta_data['invstate'] = invstate 
    738738                        sas_entry.filename = invstate.file 
Note: See TracChangeset for help on using the changeset viewer.