Changeset 861f1880 in sasview for src/sas/sasgui


Ignore:
Timestamp:
Apr 6, 2017 11:41:14 PM (7 years ago)
Author:
GitHub <noreply@…>
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:
fca1f50, f3707b9f, 643dcd93, fd5d8747
Parents:
bb81385 (diff), 6435594 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (04/06/17 23:41:14)
git-committer:
GitHub <noreply@…> (04/06/17 23:41:14)
Message:

Merge pull request #64 from andyfaff/has_key

MAINT: remove has_key occurrences

Location:
src/sas/sasgui
Files:
7 edited

Legend:

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

    r9c0f3c17 rf3bf622  
    269269        # Note: by design, the output type should always be part of the 
    270270        #       results object. 
    271         if self.results.outputs.has_key(output_type): 
     271        if output_type in self.results.outputs: 
    272272            self.plotpanel.plot.x = self.results.d_max 
    273273            self.plotpanel.plot.y = self.results.outputs[output_type][2] 
  • src/sas/sasgui/perspectives/pr/pr.py

    rc1d5aea r861f1880  
    329329 
    330330        # If we have a group ID, use it 
    331         if pr.info.has_key("plot_group_id"): 
     331        if 'plot_group_id' in pr.info: 
    332332            new_plot.group_id = pr.info["plot_group_id"] 
    333333        new_plot.id = IQ_FIT_LABEL 
     
    348348                except: 
    349349                    err[i] = 1.0 
    350                     print "Error getting error", value, x[i] 
     350                    print("Error getting error", value, x[i]) 
    351351 
    352352            new_plot = Data1D(x, y) 
     
    356356            new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 
    357357            # If we have a group ID, use it 
    358             if pr.info.has_key("plot_group_id"): 
     358            if 'plot_group_id' in pr.info: 
    359359                new_plot.group_id = pr.info["plot_group_id"] 
    360360            new_plot.id = IQ_SMEARED_LABEL 
  • src/sas/sasgui/guiframe/gui_manager.py

    r64ca561 r49165488  
    21222122        """ 
    21232123        if custom_config is not None: 
    2124             sas_opencl = os.environ.get("SAS_OPENCL",None) 
     2124            sas_opencl = os.environ.get("SAS_OPENCL") 
    21252125            new_config_lines = [] 
    21262126            config_file = open(custom_config.__file__) 
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    r463e7ffc rc1d5aea  
    9292        if dlg.ShowModal() == wx.ID_OK: 
    9393            file_list = dlg.GetPaths() 
    94             if len(file_list) >= 0 and not file_list[0] is None: 
     94            if len(file_list) >= 0 and file_list[0] is not None: 
    9595                self._default_save_location = os.path.dirname(file_list[0]) 
    9696                path = self._default_save_location 
  • src/sas/sasgui/perspectives/calculator/image_viewer.py

    r25b9707a rc1d5aea  
    4242        """ 
    4343        parent = self.parent 
    44         if parent == None: 
     44        if parent is None: 
    4545            location = os.getcwd() 
    4646        else: 
    4747            location = parent._default_save_location 
    4848        path_list = self.choose_data_file(location=location) 
    49         if path_list == None: 
     49        if path_list is None: 
    5050            return 
    51         if len(path_list) >= 0 and not(path_list[0]is None): 
    52             if parent != None: 
     51        if len(path_list) >= 0 and path_list[0] is not None: 
     52            if parent is not None: 
    5353                parent._default_save_location = os.path.dirname(path_list[0]) 
    5454        err_msg = '' 
  • src/sas/sasgui/perspectives/pr/inversion_panel.py

    r463e7ffc rc1d5aea  
    940940        Choose a new input file for I(q) 
    941941        """ 
    942         if not self._manager is None: 
     942        if self._manager is not None: 
    943943            self.plot_data.SetValue(str(data.name)) 
    944944            try: 
  • src/sas/sasgui/plottools/PlotPanel.py

    r9c0f3c17 rc1d5aea  
    14031403        if self.scale == 'log_{10}': 
    14041404            self.scale = 'linear' 
    1405             if not self.zmin_2D is None: 
     1405            if self.zmin_2D is not None: 
    14061406                zmin_2D_temp = math.pow(10, self.zmin_2D) 
    1407             if not self.zmax_2D is None: 
     1407            if self.zmax_2D is not None: 
    14081408                zmax_2D_temp = math.pow(10, self.zmax_2D) 
    14091409        else: 
    14101410            self.scale = 'log_{10}' 
    1411             if not self.zmin_2D is None: 
     1411            if self.zmin_2D is not None: 
    14121412                # min log value: no log(negative) 
    14131413                if self.zmin_2D <= 0: 
     
    14151415                else: 
    14161416                    zmin_2D_temp = math.log10(self.zmin_2D) 
    1417             if not self.zmax_2D is None: 
     1417            if self.zmax_2D is not None: 
    14181418                zmax_2D_temp = math.log10(self.zmax_2D) 
    14191419 
Note: See TracChangeset for help on using the changeset viewer.