removed unused imports; formatting
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import requests
|
import requests
|
||||||
import functools
|
import functools
|
||||||
import json
|
import json
|
||||||
from abc import ABC, abstractmethod
|
|
||||||
from .authmixin import AuthMixin, AuthError, HEADER_JSON
|
from .authmixin import AuthMixin, AuthError, HEADER_JSON
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import functools
|
from .authmixin import AuthError, HEADER_JSON
|
||||||
from typing import TypeVar, Union, List, Type, get_type_hints
|
|
||||||
|
|
||||||
from .authmixin import AuthMixin, AuthError, HEADER_JSON
|
|
||||||
from .httpclient import HttpClient
|
from .httpclient import HttpClient
|
||||||
from .snippet import Snippet, Basesnippet, Paragraph
|
from .snippet import Snippet, Basesnippet, Paragraph
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import functools
|
import functools
|
||||||
from typing import Type, get_type_hints, TypeVar
|
from typing import get_type_hints
|
||||||
|
|
||||||
|
|
||||||
def typechecked(func):
|
def typechecked(func):
|
||||||
@ -62,7 +62,7 @@ class Snippet:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_http_response(cls, response):
|
def from_http_response(cls, response):
|
||||||
if type(response)==list:
|
if type(response) == list:
|
||||||
return [cls.from_dict(resp) for resp in response]
|
return [cls.from_dict(resp) for resp in response]
|
||||||
else:
|
else:
|
||||||
return cls.from_dict(response)
|
return cls.from_dict(response)
|
||||||
@ -91,10 +91,12 @@ class Basesnippet(Snippet):
|
|||||||
defaultOrder=int,
|
defaultOrder=int,
|
||||||
linkType=str,
|
linkType=str,
|
||||||
versionable=bool,
|
versionable=bool,
|
||||||
deleted=bool)
|
deleted=bool
|
||||||
|
)
|
||||||
self.snippetType = "basesnippet"
|
self.snippetType = "basesnippet"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Paragraph(Basesnippet):
|
class Paragraph(Basesnippet):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
Reference in New Issue
Block a user