Changeset 3c56da87 in sasmodels for extra


Ignore:
Timestamp:
Mar 5, 2015 12:55:38 AM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
b89f519
Message:

lint cleanup

Location:
extra
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • extra/pylint.rc

    r53d0e24 r3c56da87  
    2020# List of plugins (as comma separated values of python modules names) to load, 
    2121# usually to register additional checkers. 
    22 load-plugins= 
     22load-plugins=pylint_numpy,pylint_pyopencl 
    2323 
    2424# Use multiple processes to speed up Pylint. 
    25 jobs=4 
     25#jobs=4 
    2626 
    2727# Allow loading of arbitrary C extensions. Extensions are imported into the 
     
    5757 
    5858# Disable the message(s) with the given id(s). 
    59 disable=W0702,W0613,W0703,W0142 
     59# http://pylint-messages.wikidot.com/all-codes 
     60disable= 
     61    multiple-statements, 
     62    global-statement, 
     63    bare-except, 
     64    broad-except, 
     65    bad-whitespace, 
     66    bad-continuation, 
     67    too-many-statements, 
     68    too-many-branches, 
     69    too-many-locals, 
     70    too-many-instance-attributes, 
     71    too-many-arguments, 
     72    star-args, 
     73    unbalanced-tuple-unpacking, 
     74    locally-disabled, 
     75    old-style-class, 
    6076 
    6177[REPORTS] 
     
    98114 
    99115# Good variable names which should always be accepted, separated by a comma 
    100 good-names=i,j,k,ex,Run,_,x,y,z,qx,qy,qz,n,q,dx,dy,dz,id,Iq,dIq,Qx,Qy,Qz 
     116good-names=_, 
     117    input, 
     118    i,j,k,n,x,y,z, 
     119    q,qx,qy,qz, 
     120    dt,dx,dy,dz,id, 
     121    Iq,dIq,Qx,Qy,Qz, 
     122    p, 
     123    ER, call_ER, VR, call_VR, 
    101124 
    102125# Bad variable names which should always be refused, separated by a comma 
     
    111134 
    112135# Regular expression matching correct function names 
    113 function-rgx=[a-z_][a-z0-9_]{2,30}$ 
     136function-rgx=[a-z_][a-z0-9_]{2,30}([123]D)?$ 
    114137 
    115138# Naming hint for function names 
     
    172195# Regular expression which should only match function or class names that do 
    173196# not require a docstring. 
    174 no-docstring-rgx=__.*__ 
     197#no-docstring-rgx=__.*__ 
     198no-docstring-rgx=_.* 
    175199 
    176200# Minimum line length for functions/classes that require docstrings, shorter 
     
    181205 
    182206# Maximum number of characters on a single line. 
    183 max-line-length=100 
     207#max-line-length=100 
     208max-line-length=80 
    184209 
    185210# Regexp for a line that is allowed to be longer than the limit. 
    186 ignore-long-lines=^\s*(# )?<?https?://\S+>?$ 
     211#ignore-long-lines=^\s*(# )?<?https?://\S+>?$ 
     212# No comma in the last forty characters 
     213ignore-long-lines=([^-,+*/]{40},?|[^"]{40}")$ 
    187214 
    188215# Allow the body of an if to be on the same line as the test if there is no 
  • extra/run-pylint.py

    r6c2eb83 r3c56da87  
    44 
    55def main(): 
     6    envpath = os.environ.get('PYTHONPATH',None) 
     7    path = [envpath] if envpath else [] 
     8    path.append(abspath(dirname(__file__))) # so we can find the plugins 
     9    os.environ['PYTHONPATH'] = ':'.join(path) 
    610    root = abspath(joinpath(dirname(__file__), '..')) 
    711    os.chdir(root) 
    8     cmd = "pylint --rcfile extra/pylint.rc -f parseable sasmodels > pylint_violations.txt" 
     12    cmd = "pylint --rcfile extra/pylint.rc -f parseable sasmodels" 
    913    status = os.system(cmd) 
    1014    sys.exit(status) 
Note: See TracChangeset for help on using the changeset viewer.