mirror of https://gitlab.com/litecord/litecord.git
fix tests and an ugly circular import
This commit is contained in:
parent
d91030a2c1
commit
bbf80f72b1
|
|
@ -91,7 +91,7 @@ async def invite_precheck_gdm(user_id: int, channel_id: int):
|
||||||
|
|
||||||
|
|
||||||
async def _inv_check_age(inv: dict):
|
async def _inv_check_age(inv: dict):
|
||||||
if inv['max_age'] is 0:
|
if inv['max_age'] != 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
now = datetime.datetime.utcnow()
|
now = datetime.datetime.utcnow()
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
"""
|
|
||||||
|
|
||||||
Litecord
|
|
||||||
Copyright (C) 2018-2019 Luna Mendes
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, version 3 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
__all__ = ['websocket_handler']
|
|
||||||
|
|
||||||
from .gateway import websocket_handler
|
|
||||||
|
|
@ -28,7 +28,7 @@ lazy guilds:
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, List, Dict, Union, Optional, Iterable, Tuple
|
from typing import Any, List, Dict, Union, Optional, Iterable, Iterator, Tuple
|
||||||
from dataclasses import dataclass, asdict, field
|
from dataclasses import dataclass, asdict, field
|
||||||
|
|
||||||
from logbook import Logger
|
from logbook import Logger
|
||||||
|
|
@ -113,7 +113,7 @@ class MemberList:
|
||||||
yield group, self.data[group.gid]
|
yield group, self.data[group.gid]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def iter_non_empty(self) -> Generator[Tuple[GroupInfo, List[int]]]:
|
def iter_non_empty(self) -> Iterator[Tuple[GroupInfo, List[int]]]:
|
||||||
"""Only iterate through non-empty groups.
|
"""Only iterate through non-empty groups.
|
||||||
|
|
||||||
Note that while the offline group can be empty, it is always
|
Note that while the offline group can be empty, it is always
|
||||||
|
|
|
||||||
2
run.py
2
run.py
|
|
@ -75,7 +75,7 @@ from litecord.images import IconManager
|
||||||
from litecord.jobs import JobManager
|
from litecord.jobs import JobManager
|
||||||
from litecord.voice.manager import VoiceManager
|
from litecord.voice.manager import VoiceManager
|
||||||
|
|
||||||
from litecord.gateway import websocket_handler
|
from litecord.gateway.gateway import websocket_handler
|
||||||
|
|
||||||
from litecord.utils import LitecordJSONEncoder
|
from litecord.utils import LitecordJSONEncoder
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue