Skip to content

Commit

Permalink
fix: load default config if none specified (#1246)
Browse files Browse the repository at this point in the history
Co-authored-by: love <[email protected]>
Co-authored-by: Tyler J Russell <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2021
1 parent f7faa72 commit ea8c574
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proselint/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import traceback
from warnings import showwarning as warn

from . import config

_cache_shelves = dict()
proselint_path = os.path.dirname(os.path.realpath(__file__))
home_dir = os.path.expanduser("~")
Expand Down Expand Up @@ -228,9 +230,8 @@ def line_and_column(text, position):
return (line_no, position - position_counter)


def lint(input_file, debug=False, config=None):
def lint(input_file, debug=False, config=config.default):
"""Run the linter on the input file."""
config = config or {}
if isinstance(input_file, str):
text = input_file
else:
Expand Down

0 comments on commit ea8c574

Please sign in to comment.