From ad4bfd32cc2e2cfddf1fdbc97df30a1117cd56c5 Mon Sep 17 00:00:00 2001 From: Jeremiah C Leary Date: Thu, 23 Nov 2017 09:58:22 -0600 Subject: [PATCH] Updates for issue #24 1) Applyied fixes from pycodestyle --- vsg/rules/comment.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vsg/rules/comment.py b/vsg/rules/comment.py index 185d214e..8351ef0b 100644 --- a/vsg/rules/comment.py +++ b/vsg/rules/comment.py @@ -1,10 +1,11 @@ from vsg import rule -import re from vsg import line +import re + class comment_rule(rule.rule): - + def __init__(self): rule.rule.__init__(self) self.name = 'comment' @@ -45,7 +46,7 @@ class rule_001(comment_rule): self.analyze(oFile) for iViolationIndex, iLineNumber in enumerate(self.violations): oLine = oFile.lines[iLineNumber] - oLine.line = ' '*self.correctCommentColumn[iViolationIndex] + oLine.line.lstrip() + oLine.line = ' ' * self.correctCommentColumn[iViolationIndex] + oLine.line.lstrip() oLine.lineLower = oLine.line.lower() oLine.commentColumn = self.correctCommentColumn[iViolationIndex] @@ -129,7 +130,7 @@ class rule_004(comment_rule): comment_rule.__init__(self) self.identifier = '004' self.solution = 'Add a space before the comment --' - self.phase = 2 + self.phase = 2 def analyze(self, oFile): lGroup = [] @@ -139,4 +140,3 @@ class rule_004(comment_rule): if oLine.hasComment and not oLine.isComment: if not re.match('^.*\s--', oLine.line): self.add_violation(iLineNumber) -