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/sasgui/plottools/transform.py

    r959eb01 r235f514  
    162162 
    163163    """ 
    164     if dx == None: 
     164    if dx is None: 
    165165        dx = 0 
    166166    return dx 
     
    175175 
    176176    """ 
    177     if dx == None: 
     177    if dx is None: 
    178178        dx = 0 
    179179    return dx 
     
    256256 
    257257    """ 
    258     if dx == None: 
     258    if dx is None: 
    259259        dx = 0 
    260260 
     
    280280 
    281281    """ 
    282     if dx == None: 
     282    if dx is None: 
    283283        dx = 0 
    284284 
     
    294294    """ 
    295295    """ 
    296     if dx == None: 
    297         dx = 0 
    298     if dy == None: 
     296    if dx is None: 
     297        dx = 0 
     298    if dy is None: 
    299299        dy = 0 
    300300    err = math.sqrt((2 * x * y * dx) ** 2 + ((x ** 2) * dy) ** 2) 
     
    314314        raise ValueError, msg 
    315315    if x != 0 and y != 0: 
    316         if dx == None: 
     316        if dx is None: 
    317317            dx = 0 
    318         if dy == None: 
     318        if dy is None: 
    319319            dy = 0 
    320320        err = (dx / x) ** 2 + (dy / y) ** 2 
     
    337337        raise ValueError, msg 
    338338    if x > 0 and y > 0: 
    339         if dx == None: 
     339        if dx is None: 
    340340            dx = 0 
    341         if dy == None: 
     341        if dy is None: 
    342342            dy = 0 
    343343        err = (2.0 * dx / x) ** 2 + (dy / y) ** 2 
     
    353353    """ 
    354354    if x != 0: 
    355         if dx == None: 
     355        if dx is None: 
    356356            dx = 0 
    357357        err = dx / x ** 2 
     
    367367    """ 
    368368    if x > 0: 
    369         if dx == None: 
     369        if dx is None: 
    370370            dx = 0 
    371371        err = -1 / 2 * math.pow(x, -3.0 / 2.0) * dx 
     
    388388        msg += " that are consistent with zero." 
    389389        raise ValueError, msg 
    390     if dx == None: 
    391         dx = 0 
    392     if dy == None: 
     390    if dx is None: 
     391        dx = 0 
     392    if dy is None: 
    393393        dy = 0 
    394394    err = math.sqrt((4.0 * dx / x) ** 2 + (dy / y) ** 2) 
     
    406406    # within errors 
    407407 
    408     if dx == None: 
    409         dx = 0 
    410     if dy == None: 
     408    if dx is None: 
     409        dx = 0 
     410    if dy is None: 
    411411        dy = 0 
    412412    err = math.sqrt((dy * pow(x, 4)) ** 2 + (4 * y * dx * math.pow(x, 3)) ** 2) 
Note: See TracChangeset for help on using the changeset viewer.