Skip to content
Open
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
exclude: compose.*\.yaml$
args: [-c=.yamllint.yml]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
rev: v1.7.11
hooks:
- id: actionlint
- repo: https://github.com/igorshubovych/markdownlint-cli
Expand All @@ -49,12 +49,12 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
rev: v0.15.2
hooks:
- id: ruff-check
args: [--fix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
rev: v0.15.2
hooks:
- id: ruff-format
- repo: https://github.com/jsh9/pydoclint
Expand Down
8 changes: 6 additions & 2 deletions src/tux/modules/info/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,13 @@ def extract_invite_code(invite_input: str) -> str:
"""
invite_input_lower = invite_input.lower()
if "discord.gg/" in invite_input_lower:
return invite_input.rsplit("discord.gg/", maxsplit=1)[-1].split("?")[0]
return invite_input.rsplit("discord.gg/", maxsplit=1)[-1].split(
"?", maxsplit=1
)[0]
if "discord.com/invite/" in invite_input_lower:
return invite_input.rsplit("discord.com/invite/", maxsplit=1)[-1].split("?")[0]
return invite_input.rsplit("discord.com/invite/", maxsplit=1)[-1].split(
"?", maxsplit=1
)[0]
return invite_input


Expand Down
Loading