Skip to content

Commit 6bb2f24

Browse files
committed
Fixed handling solutions in different languages
1 parent 6050ef0 commit 6bb2f24

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

infrastructure/src/collector.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
class SolutionsCollector:
1313
@staticmethod
14-
def collect_solutions() -> Generator:
14+
def collect_solutions() -> set:
15+
solutions = set()
16+
1517
for language, props in LANGUAGES.items():
1618
directory = props['directory']
1719
extension = props['extension']
@@ -23,10 +25,12 @@ def collect_solutions() -> Generator:
2325
if file.startswith(IGNORE):
2426
continue
2527
if file.endswith(extension):
26-
yield file.removesuffix(extension)
28+
solutions.add(file.removesuffix(extension))
2729
else:
2830
logger.warning(f'File with unknown extension for {language}: {file}')
2931

32+
return solutions
33+
3034
@classmethod
3135
def collect_problems(cls, titles: Iterable) -> Generator:
3236
for title in titles:

0 commit comments

Comments
 (0)