Ignore:
Timestamp:
10/11/19 00:27:00 (5 years ago)
Author:
bdef
Message:

CHG: syntax cahnge to meet most of Pep8 requirement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/GetIds.py

    r23793 r24214  
    1 #! /usr/bin/env python
     1#! / usr / bin / env python
    22from IdToName import *
    33from IdFromString import *
     
    99     GetIds - output ids from a given array of IDs and test names
    1010
    11               the test names can be any string or sub-string present
     11              the test names can be any string or sub - string present
    1212              in the test's name (first line of corresponding file)
    1313
     
    1818             ids = GetIds('Dakota')
    1919             ids = GetIds([101, 102...])
    20              ids = GetIds([\'Dakota\',\'Slr\'...])
    21              ids = GetIds([[101, 102...],[\'Dakota\',\'Slr\'...]])
     20             ids = GetIds([\'Dakota\', \'Slr\'...])
     21             ids = GetIds([[101, 102...], [\'Dakota\', \'Slr\'...]])
    2222    """
    2323
     
    3030            # fail silently
    3131            return []
    32         #raise RuntimeError('runme.py: GetIds.py: No tests with names matching "'+ids_names+'" were found. Note that name checking is case sensitive. Test names are in the first line of a given test eg: "Square" would include test101.py: "SquareShelfConstrainedStressSSA2d"')
     32        #raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive. Test names are in the first line of a given test eg: "Square" would include test101.py: "SquareShelfConstrainedStressSSA2d"')
    3333
    3434    if type(ids_names) == int:
     
    3737            # fail silently
    3838            return []
    39         #raise RuntimeError('runme.py: GetIds.py: No tests with ids matching "'+ids_names+'" were found. Check that there is a test file named "test'+str(ids_names)+'.py"')
     39        #raise RuntimeError('runme.py: GetIds.py: No tests with ids matching "' + ids_names + '" were found. Check that there is a test file named "test' + str(ids_names) + '.py"')
    4040
    41     # many inputs of either ids or test names
     41        # many inputs of either ids or test names
    4242    if type(ids_names) == list and len(ids_names) > 0:
    4343        # is everything a string or int?
     
    4949                raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive.')
    5050
    51     # many inputs of both ids and test names
    52     # ids_names[0] -> ids_names by id
    53     # ids_names[1] -> ids_names by test name
     51            # many inputs of both ids and test names
     52            # ids_names[0] - > ids_names by id
     53            # ids_names[1] - > ids_names by test name
    5454    if type(ids_names) == list and len(ids_names) == 2:
    5555        if type(ids_names[0]) == list and len(ids_names[0]) > 0 and type(ids_names[0][0]) == int:
     
    6060                raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive.')
    6161
    62     # no recognizable ids or id formats
     62            # no recognizable ids or id formats
    6363    if np.size(ids) == 0 and not np.all(np.equal(ids_names, None)):
    64         raise RuntimeError('runme.py: GetIds.py: include and exclude options (-i/--id; -in/--include_name; -e/--exclude; -en/--exclude_name) options must follow GetIds usage format:\n' + GetIds.__doc__)
     64        raise RuntimeError('runme.py: GetIds.py: include and exclude options (- i / - -    id; - in / - -    include_name; - e / - -    exclude; - en / - -    exclude_name) options must follow GetIds usage format:\n' + GetIds.__doc__)
    6565
    6666    return np.array(ids).astype(int)
Note: See TracChangeset for help on using the changeset viewer.