Skip to content

Commit

Permalink
refactor!: rewrite of v3
Browse files Browse the repository at this point in the history
This is a mostly full rewrite of v3 aiming for fully MyPy compatibility and the ability to hopefully compile with `mypyc`.
  • Loading branch information
VincentRPS committed Sep 1, 2023
1 parent 6a752bf commit de1ac94
Show file tree
Hide file tree
Showing 137 changed files with 948 additions and 14,874 deletions.
46 changes: 23 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,58 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Pycord'
project = "Pycord"

copyright = '2021-present, Pycord Development'
author = 'Pycord Development'
release = '3.0.0'
copyright = "2021-present, Pycord Development"
author = "Pycord Development"
release = "3.0.0"

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

sys.path.insert(0, os.path.abspath('..'))
sys.path.append(os.path.abspath('extensions'))
sys.path.insert(0, os.path.abspath(".."))
sys.path.append(os.path.abspath("extensions"))

extensions = [
'resourcelinks',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.intersphinx',
"resourcelinks",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

autodoc_member_order = 'bysource'
autodoc_typehints = 'none'
autodoc_member_order = "bysource"
autodoc_typehints = "none"

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

html_theme = 'pydata_sphinx_theme'
html_theme = "pydata_sphinx_theme"

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

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

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

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

resource_links = {
'guide': 'https://guide.pycord.dev',
'repository': 'https://github.com/pycord-development/pycord-v3',
"guide": "https://guide.pycord.dev",
"repository": "https://github.com/pycord-development/pycord-v3",
}

# Links used for cross-referencing stuff in other documentation
intersphinx_mapping = {
'py': ('https://docs.python.org/3', None),
'aio': ('https://docs.aiohttp.org/en/stable/', None),
"py": ("https://docs.python.org/3", None),
"aio": ("https://docs.aiohttp.org/en/stable/", None),
}
8 changes: 4 additions & 4 deletions docs/extensions/resourcelinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def role(


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


def setup(app: Sphinx) -> Dict[str, Any]:
app.add_config_value('resource_links', {}, 'env')
app.connect('builder-inited', add_link_role)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
app.add_config_value("resource_links", {}, "env")
app.connect("builder-inited", add_link_role)
return {"version": sphinx.__display_version__, "parallel_read_safe": True}
Empty file added examples/.gitkeep
Empty file.
11 changes: 0 additions & 11 deletions examples/bot.py

This file was deleted.

11 changes: 0 additions & 11 deletions examples/cluster.py

This file was deleted.

78 changes: 0 additions & 78 deletions examples/interactions/commands/application_commands.py

This file was deleted.

37 changes: 0 additions & 37 deletions examples/interactions/components/button.py

This file was deleted.

55 changes: 0 additions & 55 deletions examples/interactions/components/text_input.py

This file was deleted.

38 changes: 0 additions & 38 deletions examples/superspeed_rate_limiting.py

This file was deleted.

35 changes: 3 additions & 32 deletions pycord/__init__.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
"""
Pycord
~~~~~~
Making Bots Happen.
A library for modern Discord bots.
:copyright: 2021-present Pycord Development
:copyright: 2021-present Pycord
:license: MIT
"""

from ._about import *
from .api import *
from .application import *
from .audit_log import *
from .auto_moderation import *
from .bot import *
from .channel import *
from .color import *
from .commands import *
from .connection import *
from .embed import *
from .enums import *
from .events import *
from .flags import *
from .gateway import *
from .guild import *
from .guild_template import *
from .http import *
from .integration import *
from .interaction import *
from .interface import *
from .invite import *
from .media import *
from .member import *
from .message import *
from .role import *
from .snowflake import *
from .stage_instance import *
from .state import *
from .team import *
from .user import *
from .utils import *
from .voice import *
from .webhook import *
from .welcome_screen import *
Loading

1 comment on commit de1ac94

@Lulalaby
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again Vincent? XD

Please sign in to comment.