Skip to content

Commit 00e1c39

Browse files
committed
Revert "TODO: Comment out code using older pylint functionality"
This reverts commit 4803a1a.
1 parent 2f713d3 commit 00e1c39

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pylint_django/plugin.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ def register(linter):
1919
name_checker.config.good_names += ('qs',)
2020

2121
# Default pylint.checkers.base.CONST_NAME_RGX = re.compile('(([A-Z_][A-Z0-9_]*)|(__.*__))$').
22-
# todo: this has been removed from pylint in
23-
# https://github.com/PyCQA/pylint/commit/5b72e7f886ee9993025c9564d918de21cbf5acd0
24-
# start = name_checker.config.const_rgx.pattern[:-2]
25-
# end = name_checker.config.const_rgx.pattern[-2:]
26-
# const_rgx = '%s|(urls|urlpatterns|register)%s' % (start, end)
27-
# name_checker.config.const_rgx = re.compile(const_rgx)
22+
start = name_checker.config.const_rgx.pattern[:-2]
23+
end = name_checker.config.const_rgx.pattern[-2:]
24+
const_rgx = '%s|(urls|urlpatterns|register)%s' % (start, end)
25+
name_checker.config.const_rgx = re.compile(const_rgx)
2826

2927
# we don't care about South migrations
3028
linter.config.black_list += ('migrations', 'south_migrations')

0 commit comments

Comments
 (0)