Updated pyproject.toml, black+mypy
This commit is contained in:
parent
8d5a8fd424
commit
76b2241a82
|
@ -34,7 +34,7 @@ from mastoposter import (
|
|||
execute_integrations,
|
||||
load_integrations_from,
|
||||
__version__,
|
||||
__description__
|
||||
__description__,
|
||||
)
|
||||
from mastoposter.integrations import FilteredIntegration
|
||||
from mastoposter.sources import websocket_source
|
||||
|
@ -104,12 +104,9 @@ async def listen(
|
|||
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(
|
||||
prog="mastoposter",
|
||||
description=__description__
|
||||
)
|
||||
parser.add_argument("config", nargs="?",
|
||||
default=getenv("MASTOPOSTER_CONFIG_FILE")
|
||||
parser = ArgumentParser(prog="mastoposter", description=__description__)
|
||||
parser.add_argument(
|
||||
"config", nargs="?", default=getenv("MASTOPOSTER_CONFIG_FILE")
|
||||
)
|
||||
parser.add_argument("-v", action="version", version=__version__)
|
||||
args = parser.parse_args()
|
||||
|
|
|
@ -43,7 +43,7 @@ class DiscordIntegration(BaseIntegration):
|
|||
username: Optional[str] = None,
|
||||
avatar_url: Optional[str] = None,
|
||||
embeds: Optional[List[DiscordEmbed]] = None,
|
||||
) -> dict:
|
||||
) -> None:
|
||||
async with AsyncClient(
|
||||
transport=AsyncHTTPTransport(retries=self.retries)
|
||||
) as c:
|
||||
|
@ -65,7 +65,6 @@ class DiscordIntegration(BaseIntegration):
|
|||
)
|
||||
).json()
|
||||
logger.debug("Result: %r", result)
|
||||
return result
|
||||
|
||||
async def __call__(self, status: Status) -> Optional[str]:
|
||||
source = status.reblog or status
|
||||
|
|
|
@ -35,3 +35,12 @@ mastoposter = "mastoposter.__main__:main"
|
|||
|
||||
[tool.flit.sdist]
|
||||
include = ["config.ini", "contrib/*"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 79
|
||||
target-version = ['py37', 'py38']
|
||||
|
||||
[tool.mypy]
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
check_untyped_defs = true
|
||||
|
|
Loading…
Reference in New Issue