Skip to content

Commit

Permalink
Updated Regex Expressions
Browse files Browse the repository at this point in the history
updated regex expressions to not allow capital letters or leading double underscores where necessary
  • Loading branch information
maddychan authored and Madeline Chan committed Jul 1, 2016
1 parent 3a86287 commit 5fcaeaf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,26 @@ required-attributes=
bad-functions=map,filter,apply,input

# Regular expression which should only match correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
module-rgx=[a-z_][a-z0-9][a-z0-9_]{1,30}$

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

# Regular expression which should only match correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
class-rgx=[A-Z_][a-zA-Z0-9][a-zA-Z0-9]{0,30}$

# Regular expression which should only match correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$
function-rgx=[a-z_][a-z0-9][a-z0-9_]{0,30}$

# Regular expression which should only match correct method names
# method-rgx=[a-z_][a-z0-9_]{2,30}$
method-rgx=[A-Z_][a-zA-Z0-9]{2,30}$
method-rgx=[a-z_][a-z0-9_]{2,30}$

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

# Regular expression which should only match correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
argument-rgx=[a-z_][a-z0-9][a-z0-9_]{0,30}$

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

0 comments on commit 5fcaeaf

Please sign in to comment.