Skip to content

Commit dfdc4f3

Browse files
committed
chore: Update typing import in flags.py
The typing import in flags.py has been updated to include the Optional module. This change ensures that the __commands_flag_positional__ attribute can accept a value of None.
1 parent 8fdc110 commit dfdc4f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/ext/commands/flags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import re
3030
import sys
3131
from dataclasses import dataclass, field
32-
from typing import TYPE_CHECKING, Any, Iterator, Literal, Pattern, TypeVar, Union
32+
from typing import TYPE_CHECKING, Any, Iterator, Literal, Optional, Pattern, TypeVar, Union
3333

3434
from discord.utils import MISSING, MissingField, maybe_coroutine, resolve_annotation
3535

@@ -294,7 +294,7 @@ class FlagsMeta(type):
294294
__commands_flag_case_insensitive__: bool
295295
__commands_flag_delimiter__: str
296296
__commands_flag_prefix__: str
297-
__commands_flag_positional__: Flag | None
297+
__commands_flag_positional__: Optional[Flag]
298298

299299
def __new__(
300300
cls: type[type],

0 commit comments

Comments
 (0)