True if this entry should appear in the README for `lang`. An entry with `languages: [universal]` matches every language (it is rendered in all three READMEs). Otherwise the lang must be in the explicit list.
(entry: dict, lang: str)
| 233 | |
| 234 | |
| 235 | def entry_matches_lang(entry: dict, lang: str) -> bool: |
| 236 | """True if this entry should appear in the README for `lang`. |
| 237 | |
| 238 | An entry with `languages: [universal]` matches every language (it is |
| 239 | rendered in all three READMEs). Otherwise the lang must be in the |
| 240 | explicit list. |
| 241 | """ |
| 242 | langs = entry.get("languages") or [] |
| 243 | return lang in langs or "universal" in langs |
| 244 | |
| 245 | |
| 246 | def render_section(sec: dict, entries: list[dict], lang: str) -> str: |
no outgoing calls
no test coverage detected