Skip to content

Commit bd24b22

Browse files
committed
[tools] Rename find_config_path to find_home_config_dir
This avoids confusion on whether it finds the actual personal config _file_, because this function returns the _directory_ in which to find the personal config file.
1 parent c8ceb0a commit bd24b22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ def build_parser() -> SuppressingParser:
10581058
return parser
10591059

10601060

1061-
def find_personal_config() -> Optional[Path]:
1061+
def find_home_config_dir() -> Optional[Path]:
10621062
if is_windows():
10631063
app_data = os.getenv("AppData")
10641064
return Path(app_data) if app_data else None
@@ -1071,14 +1071,14 @@ def find_personal_config() -> Optional[Path]:
10711071

10721072

10731073
def read_personal_config(problem_dir: Optional[Path]) -> None:
1074-
home_config = find_personal_config()
1074+
home_config_dir = find_home_config_dir()
10751075
# possible config files, sorted by priority
10761076
config_files = []
10771077
if problem_dir:
10781078
config_files.append(problem_dir / ".bapctools.yaml")
10791079
config_files.append(Path.cwd() / ".bapctools.yaml")
1080-
if home_config:
1081-
config_files.append(home_config / "bapctools" / "config.yaml")
1080+
if home_config_dir:
1081+
config_files.append(home_config_dir / "bapctools" / "config.yaml")
10821082

10831083
for config_file in config_files:
10841084
if not config_file.is_file():

0 commit comments

Comments
 (0)