Skip to content

Commit

Permalink
refactor!: break datetime parsers out into a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharp-Eyes committed Sep 19, 2024
1 parent d556f80 commit dc72cf5
Show file tree
Hide file tree
Showing 7 changed files with 620 additions and 603 deletions.
35 changes: 35 additions & 0 deletions docs/source/api_ref/impl/parser/builtins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. currentmodule:: disnake.ext.components.impl

Builtins Parser Implementations
===============================

.. automodule:: components.impl.parser.builtins


Classes
-------

.. attributetable:: components.impl.parser.builtins.NoneParser

.. autoclass:: components.impl.parser.builtins.NoneParser
:members:

.. attributetable:: components.impl.parser.builtins.FloatParser

.. autoclass:: components.impl.parser.builtins.FloatParser
:members:

.. attributetable:: components.impl.parser.builtins.IntParser

.. autoclass:: components.impl.parser.builtins.IntParser
:members:

.. attributetable:: components.impl.parser.builtins.BoolParser

.. autoclass:: components.impl.parser.builtins.BoolParser
:members:

.. attributetable:: components.impl.parser.builtins.StringParser

.. autoclass:: components.impl.parser.builtins.StringParser
:members:
41 changes: 41 additions & 0 deletions docs/source/api_ref/impl/parser/datetime.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.. currentmodule:: disnake.ext.components.impl

Datetime Parser Implementations
===============================

.. automodule:: components.impl.parser.datetime


Enumerations
------------

.. autoenum:: components.impl.parser.datetime.Resolution
:members:

Classes
-------

.. attributetable:: components.impl.parser.datetime.DatetimeParser

.. autoclass:: components.impl.parser.datetime.DatetimeParser
:members:

.. attributetable:: components.impl.parser.datetime.TimedeltaParser

.. autoclass:: components.impl.parser.datetime.TimedeltaParser
:members:

.. attributetable:: components.impl.parser.datetime.DateParser

.. autoclass:: components.impl.parser.datetime.DateParser
:members:

.. attributetable:: components.impl.parser.datetime.TimeParser

.. autoclass:: components.impl.parser.datetime.TimeParser
:members:

.. attributetable:: components.impl.parser.datetime.TimezoneParser

.. autoclass:: components.impl.parser.datetime.TimezoneParser
:members:
3 changes: 2 additions & 1 deletion docs/source/api_ref/impl/parser/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Submodules
:maxdepth: 1

base </api_ref/impl/parser/base>
stdlib </api_ref/impl/parser/stdlib>
builtins </api_ref/impl/parser/builtins>
datetime </api_ref/impl/parser/datetime>
66 changes: 0 additions & 66 deletions docs/source/api_ref/impl/parser/stdlib.rst

This file was deleted.

3 changes: 2 additions & 1 deletion src/disnake/ext/components/impl/parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"""Implementations for all kinds of parser classes."""

from disnake.ext.components.impl.parser.base import *
from disnake.ext.components.impl.parser.builtins import *
from disnake.ext.components.impl.parser.channel import *
from disnake.ext.components.impl.parser.datetime import *
from disnake.ext.components.impl.parser.emoji import *
from disnake.ext.components.impl.parser.enum import *
from disnake.ext.components.impl.parser.guild import *
from disnake.ext.components.impl.parser.invite import *
from disnake.ext.components.impl.parser.message import *
from disnake.ext.components.impl.parser.role import *
from disnake.ext.components.impl.parser.snowflake import *
from disnake.ext.components.impl.parser.stdlib import *
from disnake.ext.components.impl.parser.user import *
Loading

0 comments on commit dc72cf5

Please sign in to comment.