fix with formatter

This commit is contained in:
grey-cat-1908 2022-05-14 17:38:52 +03:00
parent bbab69c800
commit 78745c3334
8 changed files with 12 additions and 10 deletions

View file

@ -74,7 +74,7 @@ class Client:
mobile: bool = False, mobile: bool = False,
allowed_mentions: Optional[AllowedMentions] = None, allowed_mentions: Optional[AllowedMentions] = None,
logs: Union[None, int, str, Dict[str, Any]] = "INFO", logs: Union[None, int, str, Dict[str, Any]] = "INFO",
cache: CacheManager = None cache: CacheManager = None,
): ):
self._loop = asyncio.get_event_loop() self._loop = asyncio.get_event_loop()

View file

@ -31,7 +31,7 @@ class CacheManager:
self, self,
*, *,
auto_models: Optional[List[AutoCacheModels]] = None, auto_models: Optional[List[AutoCacheModels]] = None,
auto_unused_attributes: Optional[Dict[Any, List[str]]] = None auto_unused_attributes: Optional[Dict[Any, List[str]]] = None,
): ):
self._auto_models: List[AutoCacheModels] = ( self._auto_models: List[AutoCacheModels] = (
[] if auto_models is None else auto_models [] if auto_models is None else auto_models
@ -98,7 +98,7 @@ class CacheManager:
if hasattr(guild, "channels"): if hasattr(guild, "channels"):
channels = guild.channels.values() channels = guild.channels.values()
if not AutoCacheModels.TEXT_CHANNELS in self._auto_models: if AutoCacheModels.TEXT_CHANNELS not in self._auto_models:
channels = filter( channels = filter(
lambda channel: channel.type != ChannelType.GUILD_TEXT, channels lambda channel: channel.type != ChannelType.GUILD_TEXT, channels
) )
@ -137,7 +137,9 @@ class CacheManager:
Data of guilds tso insert to the cache Data of guilds tso insert to the cache
""" """
guilds_dict = dict(map(lambda i: (i["id"], UnavailableGuild.from_dict(i)), guilds)) guilds_dict = dict(
map(lambda i: (i["id"], UnavailableGuild.from_dict(i)), guilds)
)
self._raw_guilds.update(guilds_dict) self._raw_guilds.update(guilds_dict)
return None return None