diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bae06de8e..e58e2859e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: requirements-txt-fixer name: Requirements @@ -30,12 +30,12 @@ repos: - id: check-merge-conflict name: Merge Conflicts - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.0.282' + rev: 'v0.0.292' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black name: Black Formatting diff --git a/interactions/models/internal/application_commands.py b/interactions/models/internal/application_commands.py index 073184f1a..b6cde4f0d 100644 --- a/interactions/models/internal/application_commands.py +++ b/interactions/models/internal/application_commands.py @@ -535,7 +535,7 @@ def _is_optional(anno: typing.Any) -> bool: def _remove_optional(t: OptionType | type) -> Any: - non_optional_args: tuple[type] = tuple(a for a in typing.get_args(t) if a is not types.NoneType) # noqa + non_optional_args: tuple[type] = tuple(a for a in typing.get_args(t) if a is not types.NoneType) if len(non_optional_args) == 1: return non_optional_args[0] return typing.Union[non_optional_args] # type: ignore