Changeset bc6532e in sasview for src/sas/sascalc/dataloader


Ignore:
Timestamp:
Apr 4, 2017 5:59:47 PM (8 years ago)
Author:
Adam Washington <adam.washington@…>
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:
56e2e3e
Parents:
35009a0
Message:

Try switch type annotation styles in sesans_reader.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/sesans_reader.py

    r35009a0 rbc6532e  
    120120 
    121121        :param value: The magnitude of the measurement 
    122         :type value: Number 
    123122        :param value_unit: a string containing the final desired unit 
    124         :type value_unit: String 
    125123        :param default_unit: a string containing the units of the original measurement 
    126         :type default_unit: String 
    127124        :return: The magnitude of the measurement in the new units 
    128125        """ 
     126        # (float, string, string) -> float 
    129127        if has_converter and value_unit != default_unit: 
    130128            data_conv_q = Converter(value_unit) 
     
    144142 
    145143        :param header: A dictionary of values 
    146         :type header: Dictionary 
    147144        :param key: A string which is a prefix for one of the keys in the dict 
    148         :type key: String 
    149145        :return: The value of the dictionary for the specified key 
    150146        """ 
     147        # (dict<string, x>, string) -> x 
    151148        index = [k for k in headers.keys() 
    152149                 if k.startswith(key)][0] 
     
    164161        with the units for the values appended onto the string within square 
    165162        brackets (See the example above) 
    166         :type header: Dictionary 
    167163        :param key: A string with the prefix of the dictionary key whose unit 
    168164        is being fetched 
    169         :type key: String 
    170165        :return: A string containing the unit specifed in the header 
    171166        """ 
     167        # (dict<string, _>, string) -> string 
    172168        index = [k for k in params.keys() 
    173169                 if k.startswith(key)][0] 
Note: See TracChangeset for help on using the changeset viewer.