Ignore:
Timestamp:
Apr 9, 2017 6:11:31 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:
45dffa69
Parents:
ac07a3a
Message:

MAINT: search+replace '!= None' by 'is not None'

File:
1 edited

Legend:

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

    rd85c194 r7432acb  
    353353            Draw the new roughness on the graph. 
    354354        """ 
    355         if center_x != None: 
     355        if center_x is not None: 
    356356            self.x = center_x 
    357         if center_y != None: 
     357        if center_y is not None: 
    358358            self.y = center_y 
    359359        self.center_marker.set(xdata=[self.x], ydata=[self.y]) 
     
    490490        """ 
    491491        # # save the new height, witdh of the rectangle if given as a param 
    492         if width != None: 
     492        if width is not None: 
    493493            self.half_width = width 
    494         if height != None: 
     494        if height is not None: 
    495495            self.half_height = height 
    496496        # # If new  center coordinates are given draw the rectangle 
    497497        # #given these value 
    498         if center != None: 
     498        if center is not None: 
    499499            self.center_x = center.x 
    500500            self.center_y = center.y 
     
    511511            return 
    512512        # # if x1, y1, y2, y3 are given draw the rectangle with this value 
    513         if x1 != None: 
     513        if x1 is not None: 
    514514            self.x1 = x1 
    515         if x2 != None: 
     515        if x2 is not None: 
    516516            self.x2 = x2 
    517         if y1 != None: 
     517        if y1 is not None: 
    518518            self.y1 = y1 
    519         if y2 != None: 
     519        if y2 is not None: 
    520520            self.y2 = y2 
    521521        # # Draw 2 vertical lines and a marker 
     
    657657        """ 
    658658        # # save the new height, witdh of the rectangle if given as a param 
    659         if width != None: 
     659        if width is not None: 
    660660            self.half_width = width 
    661         if height != None: 
     661        if height is not None: 
    662662            self.half_height = height 
    663663        # # If new  center coordinates are given draw the rectangle 
    664664        # #given these value 
    665         if center != None: 
     665        if center is not None: 
    666666            self.center_x = center.x 
    667667            self.center_y = center.y 
     
    679679            return 
    680680        # # if x1, y1, y2, y3 are given draw the rectangle with this value 
    681         if x1 != None: 
     681        if x1 is not None: 
    682682            self.x1 = x1 
    683         if x2 != None: 
     683        if x2 is not None: 
    684684            self.x2 = x2 
    685         if y1 != None: 
     685        if y1 is not None: 
    686686            self.y1 = y1 
    687         if y2 != None: 
     687        if y2 is not None: 
    688688            self.y2 = y2 
    689689        # # Draw 2 vertical lines and a marker 
Note: See TracChangeset for help on using the changeset viewer.