Skip to content

Commit

Permalink
Call load_options() once and save the results instead of calling it t…
Browse files Browse the repository at this point in the history
…wice
  • Loading branch information
David Kerkeslager authored and suchow committed Jun 24, 2016
1 parent 000a25f commit 712d915
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions proselint/tools.py
Expand Up @@ -125,9 +125,8 @@ def wrapped(*args, **kwargs):
return wrapped


def get_checks():
def get_checks(options):
"""Extract the checks."""
options = load_options()
sys.path.append(proselint_path)
checks = []
check_names = [key for (key, val)
Expand Down Expand Up @@ -222,7 +221,7 @@ def lint(input_file, debug=False):
text = input_file.read()

# Get the checks.
checks = get_checks()
checks = get_checks(options)

# Apply all the checks.
errors = []
Expand Down

0 comments on commit 712d915

Please sign in to comment.