Skip to content
Open
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
44 changes: 22 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.10.1
- id: check-ast
- id: check-builtin-literals
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
language_version: python3.11
- repo: https://github.com/asottile/pyupgrade
- id: black
language_version: python3.11
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: reorder-python-imports
- repo: https://github.com/asottile/add-trailing-comma
- id: isort
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/hadialqattan/pycln
rev: v2.3.0
- id: add-trailing-comma
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
- id: pycln

default_language_version:
python: python3.11
python: python3.11
3 changes: 2 additions & 1 deletion pomice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

Licensed under GPL-3.0
"""

import discord

if not discord.version_info.major >= 2:
Expand All @@ -31,7 +32,7 @@ class DiscordPyOutdated(Exception):
from .exceptions import *
from .filters import *
from .objects import *
from .queue import *
from .player import *
from .pool import *
from .queue import *
from .routeplanner import *
1 change: 1 addition & 0 deletions pomice/applemusic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Apple Music module for Pomice, made possible by cloudwithax 2023"""

from .client import *
from .exceptions import *
from .objects import *
1 change: 1 addition & 0 deletions pomice/applemusic/objects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for managing Apple Music objects"""

from typing import List

__all__ = (
Expand Down
2 changes: 1 addition & 1 deletion pomice/events.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations

from abc import ABC
from typing import TYPE_CHECKING
from typing import Any
from typing import Optional
from typing import Tuple
from typing import TYPE_CHECKING

from discord import Client
from discord import Guild
Expand Down
7 changes: 4 additions & 3 deletions pomice/player.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from __future__ import annotations

import time
from typing import TYPE_CHECKING
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import TYPE_CHECKING
from typing import Union

from discord import Client
Expand All @@ -14,6 +14,8 @@
from discord import VoiceProtocol
from discord.ext import commands

from pomice.utils import LavalinkVersion

from . import events
from .enums import SearchType
from .events import PomiceEvent
Expand All @@ -30,11 +32,10 @@
from .objects import Track
from .pool import Node
from .pool import NodePool
from pomice.utils import LavalinkVersion

if TYPE_CHECKING:
from discord.types.voice import VoiceServerUpdate
from discord.types.voice import GuildVoiceState
from discord.types.voice import VoiceServerUpdate

__all__ = ("Filters", "Player")

Expand Down
4 changes: 2 additions & 2 deletions pomice/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import time
from os import path
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Type
from typing import TYPE_CHECKING
from typing import Union
from urllib.parse import quote

Expand All @@ -28,8 +28,8 @@
from . import __version__
from . import applemusic
from . import spotify
from .enums import *
from .enums import LogLevel
from .enums import *
from .exceptions import InvalidSpotifyClientAuthorization
from .exceptions import LavalinkVersionIncompatible
from .exceptions import NodeConnectionFailure
Expand Down
1 change: 1 addition & 0 deletions pomice/spotify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Spotify module for Pomice, made possible by cloudwithax 2023"""

from .client import Client
from .exceptions import *
from .objects import *
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.black]
Expand All @@ -17,3 +14,7 @@ no_implicit_optional = true
check_untyped_defs = true
warn_unused_ignores = true
show_error_codes = true

[tool.isort]
force_single_line = true
profile = "black"