Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Repackage into lightbulb extension library
Browse files Browse the repository at this point in the history
  • Loading branch information
tandemdude committed Dec 13, 2021
1 parent 763848f commit 92b690e
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A basic command:

```python
import lightbulb
from wtf import *
from lightbulb.ext.wtf import *

bot = lightbulb.BotApp(...)

Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
import re
import sys

sys.path.insert(0, os.path.abspath(os.path.join("..", "..")))
sys.path.insert(0, os.path.abspath(os.path.join("..", "..", "lightbulb", "ext")))
sys.setrecursionlimit(1500)


# -- Project information -----------------------------------------------------

project = "lightbulb-wtf"
project = "lightbulb-ext-wtf"
copyright = "2021-present, tandemdude"
author = "tandemdude"

with open("../../wtf/__init__.py") as fp:
with open("../../lightbulb/ext/wtf/__init__.py") as fp:
file = fp.read()
version = re.search(r"__version__ = \"([^\"]+)", file).group(1)
release = version
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Use the package manager `pip <https://pip.pypa.io/en/stable/>`_ to install light

.. code-block:: bash
pip install lightbulb-wtf
pip install lightbulb-ext-wtf
Issues
Expand All @@ -44,7 +44,7 @@ Please also open an issue for any new features you would like to see added.
Links
=====

**Repository:** `GitHub <https://github.com/tandemdude/lightbulb-wtf>`_
**Repository:** `GitHub <https://github.com/tandemdude/lightbulb-ext-wtf>`_

**Documentation:** `View Here <https://lightbulb-wtf.readthedocs.io/en/latest/>`_

Expand Down
18 changes: 9 additions & 9 deletions wtf/__init__.py → lightbulb/ext/wtf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright © tandemdude 2021-present
from wtf import basic
from wtf import commands
from wtf import executable
from wtf import options
from wtf.basic import *
from wtf.commands import *
from wtf.executable import *
from wtf.options import *
from . import basic
from . import commands
from . import executable
from . import options
from .basic import *
from .commands import *
from .executable import *
from .options import *

__all__ = [
"Name",
Expand Down Expand Up @@ -39,4 +39,4 @@
"Option",
]

__version__ = "0.0.1"
__version__ = "0.1.0"
File renamed without changes.
2 changes: 1 addition & 1 deletion wtf/basic.py → lightbulb/ext/wtf/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

__all__ = ["Name", "Description"]

from wtf import base
from . import base


class _Name(base._SingleArgBase[str]):
Expand Down
8 changes: 4 additions & 4 deletions wtf/commands.py → lightbulb/ext/wtf/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import hikari
import lightbulb

from wtf import base
from wtf import basic
from wtf import executable
from wtf import options
from . import base
from . import basic
from . import executable
from . import options

_CommandCallbackT = t.TypeVar("_CommandCallbackT", bound=t.Callable[..., t.Coroutine[t.Any, t.Any, None]])

Expand Down
2 changes: 1 addition & 1 deletion wtf/executable.py → lightbulb/ext/wtf/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import lightbulb

from wtf import base
from . import base


class _Executes(base._SingleArgBase[t.Callable[[lightbulb.Context], t.Union[None, t.Coroutine[t.Any, t.Any, None]]]]):
Expand Down
4 changes: 2 additions & 2 deletions wtf/options.py → lightbulb/ext/wtf/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import hikari
import lightbulb

from wtf import base
from wtf import basic
from . import base
from . import basic


class _Type(base._SingleArgBase[t.Any]):
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
from setuptools import find_namespace_packages
from setuptools import setup

name = "wtf"
name = "lightbulb"


def parse_meta():
with open(os.path.join(name, "__init__.py")) as fp:
with open(os.path.join(name, "ext", "wtf", "__init__.py")) as fp:
code = fp.read()

token_pattern = re.compile(
Expand Down Expand Up @@ -42,14 +42,14 @@ def parse_requirements_file(path):
meta = parse_meta()

setup(
name="lightbulb-wtf",
name="lightbulb-ext-wtf",
version=meta.version,
description="A very strange method of declaring commands with hikari-lightbulb",
long_description=long_description(),
long_description_content_type="text/markdown",
author="tandemdude",
author_email="[email protected]",
url="https://github.com/tandemdude/lightbulb-wtf",
url="https://github.com/tandemdude/lightbulb-ext-wtf",
packages=find_namespace_packages(include=[name + "*"]),
license="Beerware",
include_package_data=True,
Expand Down

0 comments on commit 92b690e

Please sign in to comment.