MCPcopy Create free account
hub / github.com/psf/black / get_case_path

Function get_case_path

tests/util.py:156–164  ·  view source on GitHub ↗

Get case path from name

(
    subdir_name: str, name: str, data: bool = True, suffix: str = PYTHON_SUFFIX
)

Source from the content-addressed store, hash-verified

154
155
156def get_case_path(
157 subdir_name: str, name: str, data: bool = True, suffix: str = PYTHON_SUFFIX
158) -> Path:
159 """Get case path from name"""
160 case_path = get_base_dir(data) / subdir_name / name
161 if not name.endswith(ALLOWED_SUFFIXES):
162 case_path = case_path.with_suffix(suffix)
163 assert case_path.is_file(), f"{case_path} is not a file."
164 return case_path
165
166
167def read_data(subdir_name: str, name: str, data: bool = True) -> Tuple[str, str]:

Calls 1

get_base_dirFunction · 0.85