MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / github_request

Function github_request

Scripts/DedSec Market.py:415–435  ·  view source on GitHub ↗
(url, not_found_ok=False)

Source from the content-addressed store, hash-verified

413 return "en"
414 if value in greek_aliases:
415 return "el"
416
417 compact = re.sub(r"\s+", " ", value).strip()
418 if re.fullmatch(r"(?:🇬🇧|🇺🇸)?\s*(?:english|en|eng|αγγλικα|αγγλικη εκδοση)", compact):
419 return "en"
420 if re.fullmatch(r"(?:🇬🇷)?\s*(?:greek|el|gr|ellinika|ελληνικα|ελληνικη εκδοση)", compact):
421 return "el"
422
423 for separator in ("—", "–", "|", ":"):
424 if separator in value:
425 tail = value.rsplit(separator, 1)[-1].strip(" -")
426 if tail in english_aliases:
427 return "en"
428 if tail in greek_aliases:
429 return "el"
430
431 suffix_match = re.search(
432 r"(?:^|\s[-—–|:]\s*)(english|en|greek|el|gr|ellinika|ελληνικα|🇬🇧|🇬🇷)\s*$",
433 value,
434 )
435 if suffix_match:
436 token = suffix_match.group(1)
437 return "el" if token in greek_aliases else "en"
438 return None

Callers 1

get_repo_infoFunction · 0.70

Calls 2

MarketErrorClass · 0.70
trFunction · 0.70

Tested by

no test coverage detected