Skip to content

Commit e7fcdfb

Browse files
committed
refactor(config)!: remove deprecated .proselintrc
BREAKING CHANGE: Bare .proselintrc files are no longer read.
1 parent d19d1c8 commit e7fcdfb

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

proselint/config/__init__.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from itertools import chain
77
from pathlib import Path
88
from typing import TypeAlias, TypedDict, TypeVar, cast
9-
from warnings import showwarning as warn
109

1110
from proselint import config
1211
from proselint.config import paths
@@ -81,19 +80,11 @@ def load_from(config_path: Path | None = None) -> Config:
8180
result = DEFAULT
8281
config_paths = paths.config_paths + ([config_path] if config_path else [])
8382

84-
for path in config_paths:
85-
if path.is_file():
86-
result = _deepmerge_dicts(
87-
cast("dict[str, object]", result),
88-
json.loads(path.read_text()), # pyright: ignore[reportAny]
89-
)
90-
if path.suffix == ".json" and (old := path.with_suffix("")).is_file():
91-
warn(
92-
f"{old} was found instead of a JSON file. Rename to {path}.",
93-
DeprecationWarning,
94-
"",
95-
0,
96-
)
83+
for path in filter(Path.is_file, config_paths):
84+
result = _deepmerge_dicts(
85+
cast("dict[str, object]", result),
86+
json.loads(path.read_text()), # pyright: ignore[reportAny]
87+
)
9788

9889
result = cast("Config", result)
9990

0 commit comments

Comments
 (0)