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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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() 
Note: See TracChangeset for help on using the changeset viewer.