MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / detect_async_style

Method detect_async_style

core/preferences.py:179–185  ·  view source on GitHub ↗

Detect whether async/await patterns are used.

(cls, content: str)

Source from the content-addressed store, hash-verified

177
178 @classmethod
179 def detect_async_style(cls, content: str) -> Optional[str]:
180 """Detect whether async/await patterns are used."""
181 score = sum(
182 1 for p in cls.ASYNC_PATTERNS["async"]
183 if re.search(p, content, re.MULTILINE)
184 )
185 return "async" if score >= 2 else None
186
187 @classmethod
188 def detect_preferred_library(cls, content: str, lib_map: Dict, category: str) -> Optional[str]:

Callers 1

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected