Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

refactor(application): migrate TextInput.label to discord.ui.Label wrapper#264

Merged
karaktaka merged 1 commit into
mainfrom
refactor/discord-label-wrapper-and-inspections
Feb 27, 2026
Merged

refactor(application): migrate TextInput.label to discord.ui.Label wrapper#264
karaktaka merged 1 commit into
mainfrom
refactor/discord-label-wrapper-and-inspections

Conversation

@karaktaka
Copy link
Copy Markdown
Contributor

Summary

  • Migrate all 10 modal classes in views/application.py and application.py from deprecated TextInput.label property setter to discord.py 2.6 discord.ui.Label(text=..., component=...) wrapper (closes #261)
  • Update _localize_field helper to accept modal and use Label wrapper instead of setting .label directly
  • Add @staticmethod to _parse_role_ids and _auto_match_roles in wow.py (PyCharm inspection fix)
  • Rename _finish_board_create/_finish_board_edit to public methods since they're called cross-class from _BoardDescriptionModal
  • Update 30 test references in test_application_view.py to match renamed instance attributes

Test plan

  • uv run ruff check — all checks passed
  • uv run ruff format --check — 98 files already formatted
  • uv run python -m pytest tests/modules/test_application_view.py -v — 93/93 passed
  • uv run python -m pytest — 944/944 passed

🤖 Generated with Claude Code

…apper (#261)

discord.py 2.6 deprecated the TextInput.label property setter in favor
of the Component v2 Label wrapper. Migrate all 10 modal classes across
views/application.py and application.py to instance-level TextInput
fields wrapped with discord.ui.Label(text=..., component=...).

Also fix PyCharm inspection findings: add @staticmethod to two wow.py
methods that don't use self, and make finish_board_create/finish_board_edit
public since they're called from _BoardDescriptionModal outside the class.

Co-Authored-By: Claude <noreply@anthropic.com>
@karaktaka karaktaka merged commit 8a2dc20 into main Feb 27, 2026
6 checks passed
@karaktaka karaktaka deleted the refactor/discord-label-wrapper-and-inspections branch February 27, 2026 14:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: migrate deprecated TextInput.label setter to discord.ui.Label (Component v2)

1 participant