Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Developer Certificate of Origin (DCO)
# Developer Certificate of Origin (DCO)
```
Version 1.1

Expand Down Expand Up @@ -33,4 +33,4 @@ By making a contribution to this project, I certify that:
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```
```
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
directory: "/"
schedule:
interval: "daily"
25 changes: 25 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pre-commit
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# From isort documentation
# https://pycqa.github.io/isort/docs/configuration/black_compatibility.html
[settings]
profile = black
multi_line_output = 3
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-ast
- id: requirements-txt-fixer
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.5.1
hooks:
- id: python-check-blanket-noqa
- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
hooks:
- id: isort
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enable=bad-indentation,line-too-long

indent-string=' '

max-line-length=120
max-line-length=120
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ Quick Example
import discord

bot = discord.Bot()

@bot.slash_command()
async def hello(ctx, name: str = None):
name = name or ctx.author.name
await ctx.respond(f"Hello {name}!")

@bot.user_command(name="Say Hello")
async def hi(ctx, user):
await ctx.respond(f"{ctx.author.mention} says hello to {user.name}!")

bot.run("token")

Traditional Commands Example
Expand Down
20 changes: 11 additions & 9 deletions discord/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@

"""

__title__ = 'discord'
__author__ = 'Pycord Development'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015-2021 Rapptz & Copyright 2021-present Pycord Development'
__version__ = '2.0.0b'
__title__ = "discord"
__author__ = "Pycord Development"
__license__ = "MIT"
__copyright__ = "Copyright 2015-2021 Rapptz & Copyright 2021-present Pycord Development"
__version__ = "2.0.0b"

__path__ = __import__('pkgutil').extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

import logging
from typing import NamedTuple, Literal
from typing import Literal, NamedTuple

from . import utils, opus, abc, ui
from . import abc, opus, ui, utils
from .activity import *
from .appinfo import *
from .asset import *
Expand Down Expand Up @@ -74,6 +74,8 @@ class VersionInfo(NamedTuple):
serial: int


version_info: VersionInfo = VersionInfo(major=2, minor=0, micro=0, releaselevel='beta', serial=1)
version_info: VersionInfo = VersionInfo(
major=2, minor=0, micro=0, releaselevel="beta", serial=1
)

logging.getLogger(__name__).addHandler(logging.NullHandler())
Loading