mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
core_file_for matches remaining core file types via filename prefix 🟩
This commit is contained in:
parent
a2dc945bf3
commit
605f2e3d1e
1 changed files with 11 additions and 1 deletions
|
|
@ -73,7 +73,17 @@ def core_file_for(
|
|||
return CoreFiles.MEDIUM_TERM_IMPROVEMENT_PLAN
|
||||
if evidence_category is None and "-OSM-" in filename and "DR-N-A" in filename:
|
||||
return CoreFiles.RETROFIT_DESIGN_DOC
|
||||
raise NotImplementedError
|
||||
_prefix_skip = {
|
||||
CoreFiles.RETROFIT_DESIGN_DOC,
|
||||
CoreFiles.IMPROVEMENT_OPTION_EVALUATION,
|
||||
CoreFiles.MEDIUM_TERM_IMPROVEMENT_PLAN,
|
||||
}
|
||||
for core_file in CoreFiles:
|
||||
if core_file in _prefix_skip:
|
||||
continue
|
||||
if filename.startswith(core_file.value):
|
||||
return core_file
|
||||
return None
|
||||
|
||||
|
||||
def infer_file_type(filename: str) -> Optional[str]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue