Skip to content

Commit

Permalink
Fixing multiline comment test for python 3.8 and removing print state…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
swansonk14 committed Sep 28, 2024
1 parent 02f4358 commit fdc0000
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/tap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ def get_class_variables(cls: type) -> Dict[str, Dict[str, str]]:
if line in final_assign_lines:
# Find the comment (if it exists)
for token in tokens:
print(token)
if token["token_type"] == tokenize.COMMENT:
# Leave out "#" and whitespace from comment
variable_to_comment[class_variable]["comment"] = token["token"][1:].strip()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class MultilineArgument:
self.assertEqual(get_class_variables(MultilineArgument), class_variables)

def test_multiline_argument_with_final_hashtag_comment(self):
class MultilineArgument:
class MultilineArgumentWithHashTagComment:
bar: str = (
"This is a multiline argument"
" that should not be included in the docstring"
Expand All @@ -347,7 +347,7 @@ class MultilineArgument:
) # yay!

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

def test_single_quote_multiline(self):
class SingleQuoteMultiline:
Expand Down

0 comments on commit fdc0000

Please sign in to comment.