Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: fix extract_ignored_languages; update deps #156

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,20 @@ def make_graph(block_style: str, percent: float, gr_len: int, lg_nm: str = "", /
return graph_bar


def _extract_ignored_languages():
if not wk_i.ignored_languages:
return False
temp = ""
for igl in wk_i.ignored_languages.strip().split():
if igl.startswith('"'):
temp = igl
continue
if igl.endswith('"'):
igl = f"{temp} {igl}"
temp = ""
yield igl


def prep_content(stats: dict[str, Any], /):
"""WakaReadme Prepare Markdown.

Expand Down Expand Up @@ -315,7 +329,7 @@ def prep_content(stats: dict[str, Any], /):
)
return contents.rstrip("\n")

ignored_languages = set[str](igl.lower() for igl in wk_i.ignored_languages.strip().split())
ignored_languages = _extract_ignored_languages()
for idx, lang in enumerate(lang_info):
lang_name = str(lang["name"])
if ignored_languages and lang_name.lower() in ignored_languages:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
"Typing :: Typed",
]
requires-python = ">=3.12"
dependencies = ["faker>=22.6.0", "pygithub>=2.1.1", "requests>=2.31.0"]
dependencies = ["faker>=24.4.0", "pygithub>=2.3.0", "requests>=2.31.0"]

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

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

####################
# Configurations #
Expand Down
Loading