removed unused imports; formatting

This commit is contained in:
NichtJens
2021-06-01 09:17:02 +02:00
parent d0deb73522
commit a026df3120
3 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,7 @@
import requests
import functools
import json
from abc import ABC, abstractmethod
from .authmixin import AuthMixin, AuthError, HEADER_JSON

View File

@ -1,9 +1,6 @@
from __future__ import annotations
import functools
from typing import TypeVar, Union, List, Type, get_type_hints
from .authmixin import AuthMixin, AuthError, HEADER_JSON
from .authmixin import AuthError, HEADER_JSON
from .httpclient import HttpClient
from .snippet import Snippet, Basesnippet, Paragraph

View File

@ -1,5 +1,5 @@
import functools
from typing import Type, get_type_hints, TypeVar
from typing import get_type_hints
def typechecked(func):
@ -62,7 +62,7 @@ class Snippet:
@classmethod
def from_http_response(cls, response):
if type(response)==list:
if type(response) == list:
return [cls.from_dict(resp) for resp in response]
else:
return cls.from_dict(response)
@ -91,10 +91,12 @@ class Basesnippet(Snippet):
defaultOrder=int,
linkType=str,
versionable=bool,
deleted=bool)
deleted=bool
)
self.snippetType = "basesnippet"
class Paragraph(Basesnippet):
def __init__(self):
super().__init__()