Skip to content

Commit 2edb6aa

Browse files
authored
Merge pull request #269 from kaifcodec/fix/capitalization-issue
fix: mypy error in line 114 in orchestrator.py in PR #267
2 parents 554775a + 807e97a commit 2edb6aa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

user_scanner/core/orchestrator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,16 @@ def run_user_full(username: str, configs: ScanConfig) -> List[Result]:
103103
display_name = cat_name.capitalize()
104104
for m in modules:
105105
all_modules.append(m)
106-
site_key = get_site_name(m).capitalize()
106+
# Match the worker's capitalization exactly to prevent "Unknown" category bugs
107+
site_key = get_site_name(m).capitalize()
107108
module_to_cat[site_key] = display_name
108109

109110
with ThreadPoolExecutor(max_workers=60) as executor:
110111
exec_map = executor.map(
111112
lambda m: _worker_single(m, username, configs), all_modules
112113
)
113114
for result in exec_map:
114-
cat_name = module_to_cat.get(result.site_name, "Unknown")
115+
cat_name = module_to_cat.get(result.site_name, "Unknown") if result.site_name else "Unknown"
115116

116117
result.update(category=cat_name)
117118
results.append(result)
@@ -131,6 +132,7 @@ def run_user_full(username: str, configs: ScanConfig) -> List[Result]:
131132

132133

133134

135+
134136
def make_request(url: str, **kwargs) -> httpx.Response:
135137
"""Simple wrapper to **httpx.get** that predefines headers and timeout"""
136138
if "headers" not in kwargs:

0 commit comments

Comments
 (0)