Changeset d4d4c8a in sasview


Ignore:
Timestamp:
Jul 12, 2012 2:19:08 PM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
4cc25e9
Parents:
5e5704d
Message:

datapanel: second clean up for pylint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/data_panel.py

    r5e5704d rd4d4c8a  
    100100        """ 
    101101        # Get the item data 
    102         data1 = self.GetItemText(item1) 
    103         data2 = self.GetItemText(item2) 
     102        data_1 = self.GetItemText(item1) 
     103        data_2 = self.GetItemText(item2) 
    104104        # Compare the item data 
    105         if data1 < data2: 
     105        if data_1 < data_2: 
    106106            return -1 
    107         elif data1 > data2: 
     107        elif data_1 > data_2: 
    108108            return 1 
    109109        else: 
     
    239239        wx.EVT_COMBOBOX(self.selection_cbox, -1, self._on_selection_type) 
    240240        self.sizer5.AddMany([(select_txt, 0, wx.ALL,5),  
    241                             (self.selection_cbox,0, wx.ALL,5)]) 
     241                            (self.selection_cbox, 0, wx.ALL,5)]) 
    242242        self.enable_selection() 
    243243         
     
    403403        """ 
    404404        data = None 
    405         selection = event.GetSelection() 
     405        #selection = event.GetSelection() 
    406406        id, _, _ = self.FindFocus().GetSelection().GetData() 
    407407        data_list, theory_list = \ 
     
    467467        """ 
    468468        data = self._get_data_selection(event) 
    469         path = None 
     469        #path = None 
    470470        default_name = data.name 
    471471        if default_name.count('.') > 0: 
     
    541541            id, data_class_name, _ = \ 
    542542                            self.tree_ctrl_theory.GetSelection().GetData() 
    543             data_list, _ = \ 
    544                             self.parent.get_data_manager().get_by_id(id_list=[id]) 
     543            _, _ = self.parent.get_data_manager().get_by_id(id_list=[id]) 
    545544        except: 
    546545            return 
     
    667666                        data_ctrl_list =  self.list_cb_data[state_id] 
    668667                        #This state is already display replace it contains 
    669                         data_c, d_i_c, d_t_c, r_n_c,  i_c_c, p_c_c, d_p_c, t_c \ 
     668                        data_c, d_i_c, d_t_c, r_n_c,  i_c_c, p_c_c, d_p_c, _ \ 
    670669                                = data_ctrl_list 
    671670                        self.tree_ctrl.SetItemText(data_c, data_name)  
     
    774773            theory_list_ctrl = {} 
    775774            for theory_id, item in theory_list.iteritems(): 
    776                 theory_data, theory_state = item 
     775                theory_data, _ = item 
    777776                if theory_data is not None: 
    778777                    name = theory_data.name 
     
    897896        #remove theory  references independently of data 
    898897        for key in theory_key: 
    899             for t_key, theory_dict in self.list_cb_theory.iteritems(): 
     898            for _, theory_dict in self.list_cb_theory.iteritems(): 
    900899                if key in theory_dict: 
    901900                    for  key, value in theory_dict.iteritems(): 
     
    11191118    def check_theory_to_freeze(self): 
    11201119        """ 
     1120        Check_theory_to_freeze 
    11211121        """ 
    11221122    def enable_freeze(self): 
     
    12881288    
    12891289     
    1290 from sans.guiframe.dataFitting import Data1D 
    1291 from sans.guiframe.dataFitting import Data2D, Theory1D 
     1290from sans.guiframe.dataFitting import Theory1D 
    12921291from sans.guiframe.data_state import DataState 
    12931292 
     
    13321331        path = "path1" 
    13331332        state1 = State() 
    1334         data_list1['1'] = set_data_state(data1, path,theory, state1) 
     1333        data_list1['1'] = set_data_state(data1, path, theory, state1) 
    13351334        #state 2 
    13361335        data1 = Data2D() 
     
    13431342        #state3 
    13441343        state1 = State() 
    1345         data_list1['2'] = set_data_state(data1, path,theory, state1) 
     1344        data_list1['2'] = set_data_state(data1, path, theory, state1) 
    13461345        data1 = Data1D() 
    13471346        data1.id = 3 
     
    13571356        process1 = data1.process[len(data1.process)-1] 
    13581357        process1.data = "07/22/2010" 
    1359         data_list1['4'] = set_data_state(data1, path,theory, state1) 
     1358        data_list1['4'] = set_data_state(data1, path, theory, state1) 
    13601359        #state 4 
    13611360        temp_data_list = {} 
    13621361        data1.name = "data5 erasing data2" 
    1363         temp_data_list['4'] = set_data_state(data1, path,theory, state1) 
     1362        temp_data_list['4'] = set_data_state(data1, path, theory, state1) 
    13641363        #state 5 
    13651364        data1 = Data2D() 
     
    13671366        data1.id = 5 
    13681367        data1.append_empty_process() 
    1369         process1 = data.process[len(data1.process)-1] 
     1368        process1 = data1.process[len(data1.process)-1] 
    13701369        process1.data = "07/01/2010" 
    13711370        theory = Theory1D() 
     
    13731372        path = "path2" 
    13741373        state1 = State() 
    1375         dstate= set_data_state(data, path,theory, state1) 
     1374        dstate1= set_data_state(data1, path, theory, state1) 
    13761375        theory = Theory1D() 
    13771376        theory.id = 6 
    13781377        theory.name = "CoreShell" 
    1379         dstate.set_theory(theory) 
     1378        dstate1.set_theory(theory) 
    13801379        theory = Theory1D() 
    13811380        theory.id = 6 
    13821381        theory.name = "CoreShell replacing coreshell in data3" 
    1383         dstate.set_theory(theory) 
    1384         data_list1['3'] = dstate 
     1382        dstate1.set_theory(theory) 
     1383        data_list1['3'] = dstate1 
    13851384        #state 6 
    13861385        data_list1['6'] = set_data_state(None, path, theory, state1) 
Note: See TracChangeset for help on using the changeset viewer.