Changeset ac07a3a in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Apr 9, 2017 6:08:43 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:
7432acb
Parents:
235f514
Message:

MAINT: replace 'not x is None' by 'x is not None'

Location:
src/sas/sasgui/guiframe
Files:
4 edited

Legend:

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

    r235f514 rac07a3a  
    10171017                            if index - 1 >= 0: 
    10181018                                new_row, _ = temp_list[index - 1] 
    1019                                 if not new_row is None and new_row != ' ': 
     1019                                if new_row is not None and new_row != ' ': 
    10201020                                    label += create_label(col_name, None, 
    10211021                                                          int(new_row) + 1) 
     
    10251025                            if index + 1 < len(temp_list): 
    10261026                                new_row, _ = temp_list[index + 1] 
    1027                                 if not new_row is None: 
     1027                                if new_row is not None: 
    10281028                                    label += create_label(col_name, 
    10291029                                                          int(new_row) + 1, None) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    r235f514 rac07a3a  
    618618            # add menu of other plugins 
    619619            item_list = self.parent.get_current_context_menu(self) 
    620             if (not item_list is None) and (not len(item_list) == 0): 
     620            if (item_list is not None) and (len(item_list)): 
    621621                for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 
    622  
    623622                    try: 
    624623                        plot_menu.Append(wx_id, item[0], name) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py

    r235f514 rac07a3a  
    320320        if len(self.data2D.detector) <= 1: 
    321321            item_list = self.parent.get_current_context_menu(self) 
    322             if (not item_list is None) and (not len(item_list) == 0) and\ 
    323                 self.data2D.name.split(" ")[0] != 'Residuals': 
     322            if ((item_list is not None) and len(item_list) and 
     323                self.data2D.name.split(" ")[0] != 'Residuals'): 
    324324                for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 
    325325                    try: 
     
    533533        """ 
    534534        ## Clear current slicer 
    535         if not self.slicer is None: 
     535        if self.slicer is not None: 
    536536            self.slicer.clear() 
    537537        ## Create a new slicer 
     
    719719        Clear the slicer on the plot 
    720720        """ 
    721         if not self.slicer is None: 
     721        if self.slicer is not None: 
    722722            self.slicer.clear() 
    723723            self.subplot.figure.canvas.draw() 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py

    r235f514 rac07a3a  
    249249        Add new mask to old mask 
    250250        """ 
    251         if not self.slicer is None: 
     251        if self.slicer is not None: 
    252252            data = Data2D() 
    253253            data = self.data 
Note: See TracChangeset for help on using the changeset viewer.