Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _fix_violations(self, oFile):
for dViolation in self.violations:
fix.enforce_one_space_after_word(self, utils.get_violating_line(oFile, dViolation), 'process')
def _fix_violations(self, oFile):
for dViolation in self.violations:
fix.indent(self, utils.get_violating_line(oFile, dViolation))
def _fix_violations(self, oFile):
for dViolation in self.violations:
oLine = utils.get_violating_line(oFile, dViolation)
fix.enforce_one_space_before_word(self, oLine, 'is')
def _fix_violations(self, oFile):
for iLineNumber in self.violations:
for word in self.words_to_fix:
if self.case == 'lower':
fix_function = fix.lower_case
else:
fix_function = fix.upper_case
fix_function(self, oFile.lines[iLineNumber], word)
def _fix_violations(self, oFile):
for dViolation in self.violations:
iLineNumber = utils.get_violation_linenumber(dViolation)
oFile.lines[iLineNumber].indentLevel = dViolation['indent']
fix.indent(self, oFile.lines[iLineNumber])
def _fix_violations(self, oFile):
for dViolation in self.violations:
oLine = utils.get_violating_line(oFile, dViolation)
fix.enforce_one_space_before_word(self, oLine, self.sWord)
def _fix_violations(self, oFile):
for dViolation in self.violations:
oLine = utils.get_violating_line(oFile, dViolation)
fix.enforce_one_space_after_word(self, oLine, self.sWord)