Skip to content

Commit ebb3397

Browse files
Simplification of the use of namespace
1 parent f739901 commit ebb3397

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pydocstringformatter/run.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ def _format_file(self, filename: Path) -> bool:
4848
for index, tokeninfo in enumerate(tokens):
4949
new_tokeninfo = tokeninfo
5050

51-
formatter_options = vars(self.config)
5251
if utils._is_docstring(new_tokeninfo, tokens[index - 1]):
5352
for formatter in formatting.FORMATTERS:
54-
if formatter_options[formatter.name]:
53+
if getattr(self.config, formatter.name):
5554
new_tokeninfo = formatter.treat_token(new_tokeninfo)
5655
changed_tokens.append(new_tokeninfo)
5756

0 commit comments

Comments
 (0)