Changeset 235f514 in sasview for src/sas/sascalc/pr/invertor.py


Ignore:
Timestamp:
Apr 9, 2017 5: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/sascalc/pr/invertor.py

    r9c0f3c17 r235f514  
    162162            return self.set_dmax(value) 
    163163        elif name == 'q_min': 
    164             if value == None: 
     164            if value is None: 
    165165                return self.set_qmin(-1.0) 
    166166            return self.set_qmin(value) 
    167167        elif name == 'q_max': 
    168             if value == None: 
     168            if value is None: 
    169169                return self.set_qmax(-1.0) 
    170170            return self.set_qmax(value) 
     
    395395        Check q-value against user-defined range 
    396396        """ 
    397         if not self.q_min == None and q < self.q_min: 
     397        if not self.q_min is None and q < self.q_min: 
    398398            return False 
    399         if not self.q_max == None and q > self.q_max: 
     399        if not self.q_max is None and q > self.q_max: 
    400400            return False 
    401401        return True 
     
    658658            file.write("#has_bck=0\n") 
    659659        file.write("#alpha_estimate=%g\n" % self.suggested_alpha) 
    660         if not self.out == None: 
     660        if not self.out is None: 
    661661            if len(self.out) == len(self.cov): 
    662662                for i in range(len(self.out)): 
Note: See TracChangeset for help on using the changeset viewer.