From ea8c5749d4ea4fe1a137e45885254e71cbcefa98 Mon Sep 17 00:00:00 2001 From: oxytocin <65614600+oxytocin@users.noreply.github.com> Date: Fri, 26 Nov 2021 19:14:18 -0500 Subject: [PATCH] fix: load default config if none specified (#1246) Co-authored-by: love <rammenmaster96@gmail.com> Co-authored-by: Tyler J Russell <xtylerjrx@gmail.com> --- proselint/tools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proselint/tools.py b/proselint/tools.py index 12e45009f..e15e5047f 100644 --- a/proselint/tools.py +++ b/proselint/tools.py @@ -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("~") @@ -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: