Ignore:
Timestamp:
Apr 9, 2017 5:46:10 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:
ac07a3a
Parents:
5b2b04d
Message:

MAINT: replace '== None' by 'is None'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    r959eb01 r235f514  
    212212        On Qmin Qmax vertical line event 
    213213        """ 
    214         if event == None: 
     214        if event is None: 
    215215            return 
    216216        event.Skip() 
    217217        active_ctrl = event.active 
    218         if active_ctrl == None: 
     218        if active_ctrl is None: 
    219219            return 
    220220        if hasattr(event, 'is_corfunc'): 
     
    231231                colors.append('purple') 
    232232                values.append(min(x_data.max(), float(ctrl[2].GetValue()))) 
    233             if self.ly == None: 
     233            if self.ly is None: 
    234234                self.ly = [] 
    235235                for c, v in zip(colors, values): 
     
    336336        if hasattr(event, "action"): 
    337337            dclick = event.action == 'dclick' 
    338             if ax == None or dclick: 
     338            if ax is None or dclick: 
    339339                # remove the vline 
    340340                self._check_zoom_plot() 
     
    361361        Move the cursor line to write Q range 
    362362        """ 
    363         if self.q_ctrl == None: 
     363        if self.q_ctrl is None: 
    364364            return 
    365365        # release a q range vline 
     
    370370            return 
    371371        ax = event.inaxes 
    372         if ax == None or not hasattr(event, 'action'): 
     372        if ax is None or not hasattr(event, 'action'): 
    373373            return 
    374374        end_drag = event.action != 'drag' and event.xdata != None 
     
    618618            # add menu of other plugins 
    619619            item_list = self.parent.get_current_context_menu(self) 
    620             if (not item_list == None) and (not len(item_list) == 0): 
     620            if (not item_list is None) and (not len(item_list) == 0): 
    621621                for item, wx_id in zip(item_list, [ids.next() for i in range(len(item_list))]): 
    622622 
     
    811811        curr_label = self.appearance_selected_plot.label 
    812812 
    813         if curr_color == None: 
     813        if curr_color is None: 
    814814            curr_color = self._color_labels['Blue'] 
    815815            curr_symbol = 13 
Note: See TracChangeset for help on using the changeset viewer.