Skip to content

Commit a8f39e7

Browse files
committed
Add missing class-attribute-rgx parameter
1 parent ccd8f81 commit a8f39e7

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/main/resources/docs/description/description.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,10 @@
424424
{
425425
"name": "inlinevar-rgx",
426426
"description": "Regular expression to match Variable type, used as part of list comprehensions and generators"
427+
},
428+
{
429+
"name": "class-attribute-rgx",
430+
"description": "Regular expression matching correct class attribute names"
427431
}
428432
]
429433
},

src/main/resources/docs/patterns.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@
363363
{
364364
"name": "inlinevar-rgx",
365365
"default": "[A-Za-z_][A-Za-z0-9_]*$"
366+
},
367+
{
368+
"name": "class-attribute-rgx",
369+
"default": "([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$"
366370
}
367371
]
368372
},

src/main/resources/docs/tests/C0103.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ def good_method(bla):
1414

1515
class GnaEme(object):
1616
def good_method(bla):
17-
print "cool!"
17+
print "cool!"
18+
19+
class Complex:
20+
##Info: C0103
21+
THIS_IS_REALLY_LONG_I_MEAN_ITS_MORE_THAN_THIRTY_CHARS = 53

0 commit comments

Comments
 (0)