|
6 | 6 | from itertools import chain |
7 | 7 |
|
8 | 8 | from flake8 import style_guide |
9 | | -from flake8_polyfill import options |
10 | 9 |
|
11 | 10 | try: |
12 | 11 | import ast |
@@ -128,34 +127,32 @@ def __init__(self, tree, filename): |
128 | 127 |
|
129 | 128 | @classmethod |
130 | 129 | def add_options(cls, parser): |
131 | | - options.register(parser, '--ignore-names', |
132 | | - default=_default_ignore_names, |
133 | | - action='store', |
134 | | - type='string', |
135 | | - parse_from_config=True, |
136 | | - comma_separated_list=True, |
137 | | - help='List of names or glob patterns the pep8-naming ' |
138 | | - 'plugin should ignore. (Defaults to %default)') |
139 | | - |
140 | | - options.register(parser, '--classmethod-decorators', |
141 | | - default=_default_classmethod_decorators, |
142 | | - action='store', |
143 | | - type='string', |
144 | | - parse_from_config=True, |
145 | | - comma_separated_list=True, |
146 | | - help='List of method decorators pep8-naming plugin ' |
147 | | - 'should consider classmethods (Defaults to ' |
148 | | - '%default)') |
149 | | - |
150 | | - options.register(parser, '--staticmethod-decorators', |
151 | | - default=_default_staticmethod_decorators, |
152 | | - action='store', |
153 | | - type='string', |
154 | | - parse_from_config=True, |
155 | | - comma_separated_list=True, |
156 | | - help='List of method decorators pep8-naming plugin ' |
157 | | - 'should consider staticmethods (Defaults to ' |
158 | | - '%default)') |
| 130 | + parser.add_option( |
| 131 | + '--ignore-names', |
| 132 | + default=_default_ignore_names, |
| 133 | + parse_from_config=True, |
| 134 | + comma_separated_list=True, |
| 135 | + help='List of names or glob patterns the pep8-naming ' |
| 136 | + 'plugin should ignore. (Defaults to %default)', |
| 137 | + ) |
| 138 | + parser.add_option( |
| 139 | + '--classmethod-decorators', |
| 140 | + default=_default_classmethod_decorators, |
| 141 | + parse_from_config=True, |
| 142 | + comma_separated_list=True, |
| 143 | + help='List of method decorators pep8-naming plugin ' |
| 144 | + 'should consider classmethods (Defaults to ' |
| 145 | + '%default)', |
| 146 | + ) |
| 147 | + parser.add_option( |
| 148 | + '--staticmethod-decorators', |
| 149 | + default=_default_staticmethod_decorators, |
| 150 | + parse_from_config=True, |
| 151 | + comma_separated_list=True, |
| 152 | + help='List of method decorators pep8-naming plugin ' |
| 153 | + 'should consider staticmethods (Defaults to ' |
| 154 | + '%default)', |
| 155 | + ) |
159 | 156 | parser.extend_default_ignore(['N818']) |
160 | 157 |
|
161 | 158 | @classmethod |
|
0 commit comments