Skip to content

Commit

Permalink
Some doc fixes (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding authored Aug 12, 2022
1 parent 1afe0ef commit 9216f27
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions tanjun/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ def __init__(
----------
mapping
Either a mapping of names to the choices values or a sequence
of `tuple[name, value]` or a sequence of string values.
of `tuple[name, value]` or a sequence of choice values.
**kwargs
Choice values.
"""
if isinstance(mapping, collections.Sequence):
mapping_ = (value if isinstance(value, tuple) else (str(value), value) for value in mapping)
Expand Down Expand Up @@ -344,8 +346,8 @@ def __init__(
) -> None:
"""Create a flag instance.
Arguments
---------
Parameters
----------
aliases
Other names the flag may be triggered by.
Expand Down Expand Up @@ -486,8 +488,8 @@ async def command(
def __init__(self, value: typing.Union[int, float], /) -> None:
"""Create an argument maximum value.
Arguments
---------
Parameters
----------
value
The maximum allowed value allowed for an argument.
"""
Expand Down Expand Up @@ -547,8 +549,8 @@ async def command(
def __init__(self, value: typing.Union[int, float], /) -> None:
"""Create an argument minimum value.
Arguments
---------
Parameters
----------
value
The minimum value allowed for an argument.
"""
Expand Down Expand Up @@ -592,8 +594,8 @@ def __init__(
) -> None:
"""Create an argument name override.
Arguments
---------
Parameters
----------
both
If provided, the name to use for this option in message and slash
commands.
Expand Down Expand Up @@ -677,8 +679,8 @@ async def command(
def __init__(self, min_value: typing.Union[int, float], max_value: typing.Union[int, Float], /) -> None:
"""Create an argument range limit.
Arguments
---------
Parameters
----------
min_value
The minimum allowed value for this argument.
max_value
Expand Down Expand Up @@ -783,8 +785,8 @@ async def command(
def __init__(self, *, parse_id: collections.Callable[[str], hikari.Snowflake] = conversion.parse_snowflake) -> None:
"""Create a snowflake or argument marker.
Arguments
---------
Parameters
----------
parse_id
The function used to parse the argument's ID.
Expand Down Expand Up @@ -842,8 +844,8 @@ def __init__(
) -> None:
"""Create a slash command argument channel restraint.
Arguments
---------
Parameters
----------
channel_type
A channel type to restrain this argument by.
*other_types
Expand Down Expand Up @@ -1174,13 +1176,13 @@ def with_annotated_args(
* [tanjun.annotations.Bool][]
* [tanjun.annotations.Channel][]
* [tanjun.annotations.Color][]/[tanjun.annotations.Colour][]
* [tanjun.annotations.Datetime]
* [tanjun.annotations.Datetime][]
* [tanjun.annotations.Float][]
* [tanjun.annotations.Int][]
* [tanjun.annotations.Member][]
* [tanjun.annotations.Mentionable][]
* [tanjun.annotations.Role][]
* [tanjun.annotations.Snowflake]
* [tanjun.annotations.Snowflake][]
* [tanjun.annotations.Str][]
* [tanjun.annotations.User][]
Expand Down

0 comments on commit 9216f27

Please sign in to comment.