Changeset e65c3ba in sasmodels for sasmodels/compare.py


Ignore:
Timestamp:
Nov 28, 2017 4:09:34 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
32398dc
Parents:
110f69c
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r110f69c re65c3ba  
    944944    # work with trimmed data, not the full set 
    945945    sorted_err = np.sort(abs(err.compressed())) 
    946     if len(sorted_err) == 0.: 
     946    if len(sorted_err) == 0: 
    947947        print(label + "  no valid values") 
    948948        return 
     
    10811081    ] 
    10821082 
    1083 NAME_OPTIONS = set(k for k in OPTIONS if not k.endswith('=')) 
    1084 VALUE_OPTIONS = [k[:-1] for k in OPTIONS if k.endswith('=')] 
     1083NAME_OPTIONS = (lambda: set(k for k in OPTIONS if not k.endswith('=')))() 
     1084VALUE_OPTIONS = (lambda: [k[:-1] for k in OPTIONS if k.endswith('=')])() 
    10851085 
    10861086 
     
    11741174    name = positional_args[-1] 
    11751175 
    1176     # pylint: disable=bad-whitespace 
     1176    # pylint: disable=bad-whitespace,C0321 
    11771177    # Interpret the flags 
    11781178    opts = { 
     
    12651265        elif arg == '-html':    opts['html'] = True 
    12661266        elif arg == '-help':    opts['html'] = True 
    1267     # pylint: enable=bad-whitespace 
     1267    # pylint: enable=bad-whitespace,C0321 
    12681268 
    12691269    # Magnetism forces 2D for now 
     
    14641464    show html docs for the model 
    14651465    """ 
    1466     import os 
    14671466    from .generate import make_html 
    14681467    from . import rst2html 
     
    14991498        signal.update_parameters(problem) 
    15001499    frame.Bind(wx.EVT_TOOL, _reset_parameters, frame.ToolBar.GetToolByPos(1)) 
    1501     if is_mac: frame.Show() 
     1500    if is_mac: 
     1501        frame.Show() 
    15021502    # If running withing an app, start the main loop 
    15031503    if app: 
Note: See TracChangeset for help on using the changeset viewer.