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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    r959eb01 r235f514  
    418418        """ 
    419419        ax = event.inaxes 
    420         if ax == None: 
     420        if ax is None: 
    421421            return 
    422422        # Event occurred inside a plotting area 
     
    479479                self.xFinal, self.yFinal = event.xdata, event.ydata 
    480480                # Check whether this is the first point 
    481                 if self.xInit == None: 
     481                if self.xInit is None: 
    482482                    self.xInit = self.xFinal 
    483483                    self.yInit = self.yFinal 
     
    13671367        if dy != None and type(dy) == type(()): 
    13681368            dy = nx.vstack((y - dy[0], dy[1] - y)).transpose() 
    1369         if dx == None and dy == None: 
     1369        if dx is None and dy is None: 
    13701370            self.subplot.plot(x, y, color=self._color(color), 
    13711371                              marker=self._symbol(symbol), 
     
    14431443        c = self._color(color) 
    14441444        # If we don't have any data, skip. 
    1445         if self.data == None: 
     1445        if self.data is None: 
    14461446            return 
    14471447        if self.data.ndim == 1: 
     
    15191519            self.subplot.set_axis_off() 
    15201520 
    1521         if cbax == None: 
     1521        if cbax is None: 
    15221522            ax.set_frame_on(False) 
    15231523            cb = self.subplot.figure.colorbar(im, shrink=0.8, aspect=20) 
     
    15411541        """ 
    15421542        # No qx or qy given in a vector format 
    1543         if self.qx_data == None or self.qy_data == None \ 
     1543        if self.qx_data is None or self.qy_data is None \ 
    15441544                or self.qx_data.ndim != 1 or self.qy_data.ndim != 1: 
    15451545            # do we need deepcopy here? 
     
    16011601        """ 
    16021602        # No qx or qy given in a vector format 
    1603         if self.qx_data == None or self.qy_data == None \ 
     1603        if self.qx_data is None or self.qy_data is None \ 
    16041604                or self.qx_data.ndim != 1 or self.qy_data.ndim != 1: 
    16051605            # do we need deepcopy here? 
     
    16521652        """ 
    16531653        # No image matrix given 
    1654         if image == None or np.ndim(image) != 2 \ 
     1654        if image is None or np.ndim(image) != 2 \ 
    16551655                or np.isfinite(image).all() \ 
    1656                 or weights == None: 
     1656                or weights is None: 
    16571657            return image 
    16581658        # Get bin size in y and x directions 
     
    19401940        """ 
    19411941        """ 
    1942         if self.parent == None: 
     1942        if self.parent is None: 
    19431943            return 
    19441944        # get current caption 
Note: See TracChangeset for help on using the changeset viewer.