Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Cleanup. Not handling show-source.
Browse files Browse the repository at this point in the history
Removing unused code.
flake8 handles show-source automatically. Not bothering supporting it in
non-flake8 config sources. Out of scope.
  • Loading branch information
Robpol86 committed Apr 5, 2015
1 parent 580edd2 commit a2e63e3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions flake8_pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ def ignore(code):
return False


def parse_args(func, *args, **kwargs):
"""Used to fool argparse/optparse into thinking sys.argv[1:] is always empty."""
if args and args[0]:
args = [[]] + list(args[1:])
return func(*args, **kwargs)


class Main(object):
"""pep257 flake8 plugin."""

Expand Down Expand Up @@ -81,7 +74,6 @@ def parse_options(cls, options):
# Handle flake8 options.
cls.options['explain'] = bool(options.show_pep257)
cls.options['ignore'] = options.ignore
cls.options['show-source'] = options.show_source

# Handle pep257 options.
opt_parser = pep257.get_option_parser()
Expand All @@ -97,7 +89,6 @@ def parse_options(cls, options):
def run(self):
"""Run analysis on a single file."""
pep257.Error.explain = self.options['explain']
pep257.Error.source = self.options['show-source']
filename, source = load_file(self.filename)
for error in pep257.PEP257Checker().check_source(source, filename):
if not hasattr(error, 'code') or ignore(error.code):
Expand Down

0 comments on commit a2e63e3

Please sign in to comment.