Skip to content

Commit

Permalink
Make pylintrc the same as edx-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jul 3, 2013
1 parent 49d4a77 commit 4c65a4f
Showing 1 changed file with 43 additions and 27 deletions.
70 changes: 43 additions & 27 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ profile=no

# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
ignore=CVS, migrations

# Pickle collected data for later comparisons.
persistent=yes
Expand All @@ -33,29 +33,32 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
disable=
# Messages that are just silly:
# I0011:106: Locally disabling E1101
# W0122: 30:run_python_file: Use of the exec statement
# W0142: 31:call_singleton_method: Used * or ** magic
# W0232: 6:AnyOldObject: Class has no __init__ method
# W0603: 28:call_singleton_method: Using the global statement
# W0703:133:CoverageData._read_file: Catch "Exception"
I0011,W0122,W0142,W0232,W0603,W0703,
# Messages that may be silly:
# R0201: 42:Tracer.stop: Method could be a function
# W0613:387,27:AttemptsScoreboardBlock.student_view: Unused argument 'context'
# R0922:242,0:CheckerBlock: Abstract class is only referenced 1 times
# E1103: 26:RunTests.test_run_python_file: Instance of 'file' has no 'getvalue' member (but some types could not be inferred)
R0201,W0613,R0922,E1103,
# Messages that are noisy for now, eventually maybe we'll turn them on:
# C0103:256:coverage.morf_filename: Invalid name "f" (should match [a-z_][a-z0-9_]{2,30}$)
# W0212: 86:Reporter.report_files: Access to a protected member _analyze of a client class
# W0511:171,0: TODO: What is the specific promised semantic of the iterability
C0103,W0212,W0511,
# We definitely want to turn these on soon:
# C0111: 26,4:KeyValueStore.get: Missing docstring
C0111
disable=
# Never going to use these
# I0011: Locally disabling W0232
# C0301: Line too long
# W0141: Used builtin function 'map'
# W0142: Used * or ** magic
# R0922: Abstract class is only referenced 1 times
I0011,C0301,W0141,W0142,R0922,

# Django makes classes that trigger these
# W0232: Class has no __init__ method
W0232,

# Might use these when the code is in better shape
# C0302: Too many lines in module
# R0201: Method could be a function
# R0901: Too many ancestors
# R0902: Too many instance attributes
# R0903: Too few public methods (1/2)
# R0904: Too many public methods
# R0911: Too many return statements
# R0912: Too many branches
# R0913: Too many arguments
# R0914: Too many local variables
C0302,R0201,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914


[REPORTS]

Expand Down Expand Up @@ -103,7 +106,20 @@ zope=no
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
generated-members=REQUEST,acl_users,aq_parent,objects,DoesNotExist,can_read,can_write,get_url,size
generated-members=
REQUEST,
acl_users,
aq_parent,
objects,
DoesNotExist,
can_read,
can_write,
get_url,
size,
content,
status_code,
# For factory_boy factories
create


[BASIC]
Expand All @@ -118,7 +134,7 @@ bad-functions=map,filter,apply,input
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression which should only match correct module level names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$

# Regular expression which should only match correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
Expand All @@ -127,7 +143,7 @@ class-rgx=[A-Z_][a-zA-Z0-9]+$
function-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$
method-rgx=([a-z_][a-z0-9_]{2,60}|setUp|set[Uu]pClass|tearDown|tear[Dd]ownClass|assert[A-Z]\w*)$

# Regular expression which should only match correct instance attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$
Expand Down

0 comments on commit 4c65a4f

Please sign in to comment.