Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit de1ac94

Browse files
committed
refactor!: rewrite of v3
This is a mostly full rewrite of v3 aiming for fully MyPy compatibility and the ability to hopefully compile with `mypyc`.
1 parent 6a752bf commit de1ac94

File tree

137 files changed

+948
-14874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+948
-14874
lines changed

docs/conf.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,58 @@
99
# -- Project information -----------------------------------------------------
1010
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1111

12-
project = 'Pycord'
12+
project = "Pycord"
1313

14-
copyright = '2021-present, Pycord Development'
15-
author = 'Pycord Development'
16-
release = '3.0.0'
14+
copyright = "2021-present, Pycord Development"
15+
author = "Pycord Development"
16+
release = "3.0.0"
1717

1818
# -- General configuration ---------------------------------------------------
1919
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2020

21-
sys.path.insert(0, os.path.abspath('..'))
22-
sys.path.append(os.path.abspath('extensions'))
21+
sys.path.insert(0, os.path.abspath(".."))
22+
sys.path.append(os.path.abspath("extensions"))
2323

2424
extensions = [
25-
'resourcelinks',
26-
'sphinx.ext.autodoc',
27-
'sphinx.ext.napoleon',
28-
'sphinx.ext.intersphinx',
25+
"resourcelinks",
26+
"sphinx.ext.autodoc",
27+
"sphinx.ext.napoleon",
28+
"sphinx.ext.intersphinx",
2929
]
3030

31-
templates_path = ['_templates']
32-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
31+
templates_path = ["_templates"]
32+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
3333

34-
autodoc_member_order = 'bysource'
35-
autodoc_typehints = 'none'
34+
autodoc_member_order = "bysource"
35+
autodoc_typehints = "none"
3636

3737
# -- Options for HTML output -------------------------------------------------
3838
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3939

40-
html_theme = 'pydata_sphinx_theme'
40+
html_theme = "pydata_sphinx_theme"
4141

4242
# Add any paths that contain custom static files (such as style sheets) here,
4343
# relative to this directory. They are copied after the builtin static files,
4444
# so a file named 'default.css' will overwrite the builtin 'default.css'.
45-
html_static_path = ['_static']
45+
html_static_path = ["_static"]
4646

47-
html_logo = 'https://raw.githubusercontent.com/Pycord-Development/pycord-v3/main/docs/assets/pycord-v3.png'
47+
html_logo = "https://raw.githubusercontent.com/Pycord-Development/pycord-v3/main/docs/assets/pycord-v3.png"
4848

4949
# Any option(s) added to your certain theme.
5050
# in this case, Pydata
5151
html_theme_options = {
52-
'footer_items': ['copyright', 'sphinx-version'],
52+
"footer_items": ["copyright", "sphinx-version"],
5353
}
5454

55-
html_sidebars = {'**': ['sidebar-nav-bs']}
55+
html_sidebars = {"**": ["sidebar-nav-bs"]}
5656

5757
resource_links = {
58-
'guide': 'https://guide.pycord.dev',
59-
'repository': 'https://github.com/pycord-development/pycord-v3',
58+
"guide": "https://guide.pycord.dev",
59+
"repository": "https://github.com/pycord-development/pycord-v3",
6060
}
6161

6262
# Links used for cross-referencing stuff in other documentation
6363
intersphinx_mapping = {
64-
'py': ('https://docs.python.org/3', None),
65-
'aio': ('https://docs.aiohttp.org/en/stable/', None),
64+
"py": ("https://docs.python.org/3", None),
65+
"aio": ("https://docs.aiohttp.org/en/stable/", None),
6666
}

docs/extensions/resourcelinks.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ def role(
3535

3636

3737
def add_link_role(app: Sphinx) -> None:
38-
app.add_role('resource', make_link_role(app.config.resource_links))
38+
app.add_role("resource", make_link_role(app.config.resource_links))
3939

4040

4141
def setup(app: Sphinx) -> Dict[str, Any]:
42-
app.add_config_value('resource_links', {}, 'env')
43-
app.connect('builder-inited', add_link_role)
44-
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
42+
app.add_config_value("resource_links", {}, "env")
43+
app.connect("builder-inited", add_link_role)
44+
return {"version": sphinx.__display_version__, "parallel_read_safe": True}

examples/.gitkeep

Whitespace-only changes.

examples/bot.py

-11
This file was deleted.

examples/cluster.py

-11
This file was deleted.

examples/interactions/commands/application_commands.py

-78
This file was deleted.

examples/interactions/components/button.py

-37
This file was deleted.

examples/interactions/components/text_input.py

-55
This file was deleted.

examples/superspeed_rate_limiting.py

-38
This file was deleted.

pycord/__init__.py

+3-32
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,14 @@
11
"""
22
Pycord
33
~~~~~~
4-
Making Bots Happen.
4+
A library for modern Discord bots.
55
6-
:copyright: 2021-present Pycord Development
6+
:copyright: 2021-present Pycord
77
:license: MIT
88
"""
9+
910
from ._about import *
10-
from .api import *
11-
from .application import *
12-
from .audit_log import *
13-
from .auto_moderation import *
14-
from .bot import *
15-
from .channel import *
1611
from .color import *
17-
from .commands import *
18-
from .connection import *
19-
from .embed import *
2012
from .enums import *
21-
from .events import *
2213
from .flags import *
23-
from .gateway import *
24-
from .guild import *
25-
from .guild_template import *
26-
from .http import *
27-
from .integration import *
28-
from .interaction import *
29-
from .interface import *
30-
from .invite import *
31-
from .media import *
32-
from .member import *
33-
from .message import *
34-
from .role import *
35-
from .snowflake import *
36-
from .stage_instance import *
37-
from .state import *
38-
from .team import *
39-
from .user import *
4014
from .utils import *
41-
from .voice import *
42-
from .webhook import *
43-
from .welcome_screen import *

0 commit comments

Comments
 (0)