Skip to content

Commit b505af6

Browse files
committed
Fix code style issues.
1 parent 8cef805 commit b505af6

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

pygccxml/declarations/comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def end_offset(self):
102102
@end_offset.setter
103103
def end_offset(self, end_offset):
104104
self._end_offset = int(end_offset)
105-
105+
106106
@property
107107
def end_column(self):
108108
"""An integer value which corresponds to the

pygccxml/declarations/decl_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ def create_variable(self, *arguments, **keywords):
9393

9494
def create_comment(self, *arguments, **keywords):
9595
"""creates instance of class that describes variable declaration"""
96-
return comment_t(*arguments, **keywords)
96+
return comment_t(*arguments, **keywords)

pygccxml/declarations/declaration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,4 @@ def comment(self):
346346

347347
@comment.setter
348348
def comment(self, comment):
349-
self._comment = comment
349+
self._comment = comment

pygccxml/parser/scanner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ def _handle_comment(self, declaration):
217217
# Use lines and columns to capture only comment text
218218
for indx in range(comm_decl.begin_line - 1, comm_decl.end_line):
219219
comm_line = file_text[indx]
220-
comm_line = comm_line[comm_decl.begin_column - 1:comm_decl.end_column]
220+
comm_line = comm_line[
221+
comm_decl.begin_column - 1:comm_decl.end_column
222+
]
221223
# Remove newlines from end of string
222224
comm_line = comm_line.rstrip("\n")
223225
comment_text.append(comm_line)

unittests/test_comments.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,21 @@ def test(self):
4444
tmethod = tclass.member_functions()[0]
4545

4646
self.assertIn("comment", dir(tmethod))
47-
self.assertEqual(["/// cxx comment", "/// with multiple lines"], tmethod.comment.text)
47+
self.assertEqual(["/// cxx comment", "/// with multiple lines"],
48+
tmethod.comment.text)
4849

4950
tconstructor = tclass.constructors()[0]
5051

5152
self.assertIn("comment", dir(tconstructor))
5253
self.assertEqual(["/** doc comment */"], tconstructor.comment.text)
5354

54-
for indx, cmt in enumerate(['//! mutable field comment',"/// bit field comment"]):
55+
for indx, cmt in enumerate(['//! mutable field comment',
56+
"/// bit field comment"]):
5557
tvariable = tclass.variables()[indx]
5658
self.assertIn("comment", dir(tvariable))
5759
self.assertEqual([cmt], tvariable.comment.text)
5860

61+
5962
def create_suite():
6063
suite = unittest.TestSuite()
6164
suite.addTest(unittest.makeSuite(Test))

0 commit comments

Comments
 (0)