Skip to content

Commit 18be8ed

Browse files
committed
unused function
1 parent 8c85cf3 commit 18be8ed

1 file changed

Lines changed: 0 additions & 29 deletions

File tree

ted_sws/notice_metadata_processor/services/notice_eligibility.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,6 @@ def notice_eligibility_checker(notice: Notice, mapping_suite_repository: Mapping
6666
notice.set_is_eligible_for_transformation(eligibility=False)
6767

6868

69-
def notice_eligibility_checker_with_mapping_suites(notice: Notice, mapping_suites: List[MappingSuite]) -> Optional[str]:
70-
"""
71-
Check if notice is eligible for transformation by list of mapping suites
72-
:param notice:
73-
:param mapping_suites:
74-
:return:
75-
"""
76-
77-
possible_mapping_suites = []
78-
for mapping_suite in mapping_suites:
79-
if check_package(mapping_suite=mapping_suite, notice_metadata=notice.normalised_metadata):
80-
possible_mapping_suites.append(mapping_suite)
81-
82-
if possible_mapping_suites:
83-
best_version = semantic_version.Version(possible_mapping_suites[0].version)
84-
mapping_suite_identifier_with_version = possible_mapping_suites[0].identifier
85-
for mapping_suite in possible_mapping_suites[1:]:
86-
if semantic_version.Version(mapping_suite.version) > best_version:
87-
best_version = semantic_version.Version(mapping_suite.version)
88-
mapping_suite_identifier_with_version = mapping_suite.identifier
89-
90-
notice.set_is_eligible_for_transformation(eligibility=True)
91-
return mapping_suite_identifier_with_version
92-
else:
93-
notice.set_is_eligible_for_transformation(eligibility=False)
94-
95-
return None
96-
97-
9869
def notice_eligibility_checker_by_id(notice_id: str, notice_repository: NoticeRepositoryABC,
9970
mapping_suite_repository: MappingSuiteRepositoryABC) -> Tuple:
10071
"""

0 commit comments

Comments
 (0)