Skip to content

Commit fdc0000

Browse files
committed
Fixing multiline comment test for python 3.8 and removing print statement
1 parent 02f4358 commit fdc0000

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/tap/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ def get_class_variables(cls: type) -> Dict[str, Dict[str, str]]:
303303
if line in final_assign_lines:
304304
# Find the comment (if it exists)
305305
for token in tokens:
306-
print(token)
307306
if token["token_type"] == tokenize.COMMENT:
308307
# Leave out "#" and whitespace from comment
309308
variable_to_comment[class_variable]["comment"] = token["token"][1:].strip()

tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class MultilineArgument:
333333
self.assertEqual(get_class_variables(MultilineArgument), class_variables)
334334

335335
def test_multiline_argument_with_final_hashtag_comment(self):
336-
class MultilineArgument:
336+
class MultilineArgumentWithHashTagComment:
337337
bar: str = (
338338
"This is a multiline argument"
339339
" that should not be included in the docstring"
@@ -347,7 +347,7 @@ class MultilineArgument:
347347
) # yay!
348348

349349
class_variables = {"bar": {"comment": "biz baz"}, "barr": {"comment": "bar baz"}, "barrr": {"comment": "yay!"}}
350-
self.assertEqual(get_class_variables(MultilineArgument), class_variables)
350+
self.assertEqual(get_class_variables(MultilineArgumentWithHashTagComment), class_variables)
351351

352352
def test_single_quote_multiline(self):
353353
class SingleQuoteMultiline:

0 commit comments

Comments
 (0)