1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Add type hints for App and User

This commit is contained in:
Ivan Habunek 2023-11-30 20:10:19 +01:00
parent e5c8fc4f77
commit 696a9dcc2e
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -2,12 +2,23 @@ import os
import sys
from os.path import join, expanduser
from collections import namedtuple
from typing import NamedTuple
__version__ = '0.39.0'
App = namedtuple('App', ['instance', 'base_url', 'client_id', 'client_secret'])
User = namedtuple('User', ['instance', 'username', 'access_token'])
class App(NamedTuple):
instance: str
base_url: str
client_id: str
client_secret: str
class User(NamedTuple):
instance: str
username: str
access_token: str
DEFAULT_INSTANCE = 'https://mastodon.social'