Skip to content

Commit

Permalink
Removed unnecessary code.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamere-allo-peter committed Mar 11, 2022
1 parent 991fd32 commit a154ec2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions yamlfixer
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,14 @@ import sys
import os
import subprocess

VERSION = '0.1.1'
VERSION = '0.1.2'

LINTERCOMMAND = 'yamllint --format parsable --strict -'

FIX_PASSEDLINTER = 0
FIX_MODIFIED = 1
FIX_UNMODIFIED = 2
FIX_SKIPPED = 3
FIX_PERMERROR = 4
FIX_SKIPPED = 2
FIX_PERMERROR = 3

FIXER_UNHANDLED = -1
FIXER_HANDLED = 0
Expand Down Expand Up @@ -416,7 +415,6 @@ class YAMLFixer:
if not self.filenames:
self.filenames.append("-") # Add fake input from stdin
self.passed = self.modified \
= self.unmodified \
= self.skipped \
= self.permerrors \
= self.unknown = 0
Expand All @@ -442,7 +440,6 @@ class YAMLFixer:
self.info(f"Files to fix: {len(self.filenames)}")
self.info(f"{self.passed} files successfully passed yamllint strict mode")
self.info(f"{self.modified} files were modified")
self.info(f"{self.unmodified} files were left unmodified")
self.info(f"{self.skipped} files were skipped")
self.info(f"{self.permerrors} files were not writeable")
self.info(f"{self.unknown} files with unknown status")
Expand All @@ -464,9 +461,6 @@ class YAMLFixer:
elif status == FIX_MODIFIED:
self.info(f"was modified.")
self.modified += 1
elif status == FIX_UNMODIFIED:
self.info(f"was left unmodified.")
self.unmodified += 1
elif status == FIX_SKIPPED:
self.info(f"was skipped.")
self.skipped += 1
Expand Down

0 comments on commit a154ec2

Please sign in to comment.