mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Small bugfix
This commit is contained in:
parent
bef8742459
commit
6ef4007f13
1 changed files with 4 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import inspect
|
||||
import re
|
||||
from typing import Mapping, Optional, Type
|
||||
|
||||
|
|
@ -86,7 +87,9 @@ class CustomHelpCommand(commands.MinimalHelpCommand):
|
|||
if is_optional:
|
||||
name = f"[{name}]"
|
||||
|
||||
if issubclass(param.annotation, PosixFlags):
|
||||
# If there are options/flags, add them
|
||||
# The hardcoded name-check is done for performance reasons
|
||||
if name == "flags" and inspect.isclass(param.annotation) and issubclass(param.annotation, PosixFlags):
|
||||
signature_list.append("[--OPTIONS]")
|
||||
else:
|
||||
signature_list.append(name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue