Changeset ac07a3a in sasview for src/sas/sasgui/perspectives/pr


Ignore:
Timestamp:
Apr 9, 2017 6:08:43 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:
7432acb
Parents:
235f514
Message:

MAINT: replace 'not x is None' by 'x is not None'

Location:
src/sas/sasgui/perspectives/pr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/sas/sasgui/perspectives/pr/pr.py

    r235f514 rac07a3a  
    291291        """ 
    292292        qtemp = pr.x 
    293         if not q is None: 
     293        if q is not None: 
    294294            qtemp = q 
    295295 
     
    303303 
    304304        # Check for user min/max 
    305         if not pr.q_min is None: 
     305        if pr.q_min is not None: 
    306306            minq = pr.q_min 
    307         if not pr.q_max is None: 
     307        if pr.q_max is not None: 
    308308            maxq = pr.q_max 
    309309 
     
    487487        scale = None 
    488488        min_err = 0.0 
    489         if not path is None: 
     489        if path is not None: 
    490490            input_f = open(path, 'r') 
    491491            buff = input_f.read() 
     
    512512                    logger.error(sys.exc_value) 
    513513 
    514         if not scale is None: 
     514        if scale is not None: 
    515515            message = "The loaded file had no error bars, statistical errors are assumed." 
    516516            wx.PostEvent(self.parent, StatusEvent(status=message)) 
     
    537537 
    538538        data_started = False 
    539         if not path is None: 
     539        if path is not None: 
    540540            input_f = open(path, 'r') 
    541541            buff = input_f.read() 
     
    565565                    data_started = True 
    566566 
    567         if not scale is None: 
     567        if scale is not None: 
    568568            message = "The loaded file had no error bars, statistical errors are assumed." 
    569569            wx.PostEvent(self.parent, StatusEvent(status=message)) 
     
    761761        self.elapsed = elapsed 
    762762        self.control_panel.alpha_estimate = alpha 
    763         if not message is None: 
     763        if message is not None: 
    764764            wx.PostEvent(self.parent, StatusEvent(status=str(message))) 
    765765        self.perform_estimateNT() 
     
    779779        self.control_panel.nterms_estimate = nterms 
    780780        self.control_panel.alpha_estimate = alpha 
    781         if not message is None: 
     781        if message is not None: 
    782782            wx.PostEvent(self.parent, StatusEvent(status=str(message))) 
    783783 
     
    921921        try: 
    922922            pr = self._create_plot_pr() 
    923             if not pr is None: 
     923            if pr is not None: 
    924924                self.pr = pr 
    925925                self.perform_inversion() 
     
    944944        try: 
    945945            pr = self._create_plot_pr() 
    946             if not pr is None: 
     946            if pr is not None: 
    947947                self.pr = pr 
    948948                self.perform_estimate() 
     
    10241024        try: 
    10251025            pr = self._create_file_pr(data) 
    1026             if not pr is None: 
     1026            if pr is not None: 
    10271027                self.pr = pr 
    10281028                self.perform_inversion() 
  • TabularUnified src/sas/sasgui/perspectives/pr/pr_thread.py

    r235f514 rac07a3a  
    4242            pass 
    4343        except: 
    44             if not self.error_func is None: 
     44            if self.error_func is not None: 
    4545                self.error_func("CalcPr.compute: %s" % sys.exc_value) 
    4646 
     
    7070            pass 
    7171        except: 
    72             if not self.error_func is None: 
     72            if self.error_func is not None: 
    7373                self.error_func("EstimatePr.compute: %s" % sys.exc_value) 
    7474 
     
    110110            pass 
    111111        except: 
    112             if not self.error_func is None: 
     112            if self.error_func is not None: 
    113113                self.error_func("EstimatePr2.compute: %s" % sys.exc_value) 
Note: See TracChangeset for help on using the changeset viewer.