Skip to content

Commit 302cbcd

Browse files
authored
Merge pull request #156 from yozachar/workshop
maint: fix `extract_ignored_languages`; update deps
2 parents a359b8d + bc65b48 commit 302cbcd

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

main.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,20 @@ def make_graph(block_style: str, percent: float, gr_len: int, lg_nm: str = "", /
271271
return graph_bar
272272

273273

274+
def _extract_ignored_languages():
275+
if not wk_i.ignored_languages:
276+
return False
277+
temp = ""
278+
for igl in wk_i.ignored_languages.strip().split():
279+
if igl.startswith('"'):
280+
temp = igl
281+
continue
282+
if igl.endswith('"'):
283+
igl = f"{temp} {igl}"
284+
temp = ""
285+
yield igl
286+
287+
274288
def prep_content(stats: dict[str, Any], /):
275289
"""WakaReadme Prepare Markdown.
276290
@@ -315,7 +329,7 @@ def prep_content(stats: dict[str, Any], /):
315329
)
316330
return contents.rstrip("\n")
317331

318-
ignored_languages = set[str](igl.lower() for igl in wk_i.ignored_languages.strip().split())
332+
ignored_languages = _extract_ignored_languages()
319333
for idx, lang in enumerate(lang_info):
320334
lang_name = str(lang["name"])
321335
if ignored_languages and lang_name.lower() in ignored_languages:

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ classifiers = [
1616
"Typing :: Typed",
1717
]
1818
requires-python = ">=3.12"
19-
dependencies = ["faker>=22.6.0", "pygithub>=2.1.1", "requests>=2.31.0"]
19+
dependencies = ["faker>=24.4.0", "pygithub>=2.3.0", "requests>=2.31.0"]
2020

2121
[project.urls]
2222
Homepage = "https://github.com/athul/waka-readme"
@@ -36,7 +36,7 @@ extra = ["loguru>=0.7.2", "python-dotenv>=1.0.1"]
3636
#############################
3737

3838
[tool.pdm.dev-dependencies]
39-
tooling = ["bandit>=1.7.7", "black>=24.1.1", "ruff>=0.1.15", "pyright>=1.1.349"]
39+
tooling = ["bandit>=1.7.8", "black>=24.3.0", "ruff>=0.3.5", "pyright>=1.1.357"]
4040

4141
####################
4242
# Configurations #

0 commit comments

Comments
 (0)