9d853bbb03
- anki._backend stores the protobuf files and rsbackend.py code - pylib modules import protobuf messages directly from the _pb2 files, and explicitly export any will be returned or consumed by public pylib functions, so that calling code can import from pylib - the "rsbackend" no longer imports and re-exports protobuf messages - pylib can just consume them directly. - move errors to errors.py Still todo: - rsbridge - finishing the work on rsbackend, and check what we need to add back to the original file location to avoid breaking add-ons
22 lines
449 B
Python
22 lines
449 B
Python
# Copyright: Ankitects Pty Ltd and contributors
|
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
import anki._backend.backend_pb2 as _pb
|
|
|
|
# public exports
|
|
SyncAuth = _pb.SyncAuth
|
|
SyncOutput = _pb.SyncCollectionOut
|
|
SyncStatus = _pb.SyncStatusOut
|
|
|
|
|
|
# Legacy attributes some add-ons may be using
|
|
|
|
from .httpclient import HttpClient
|
|
|
|
AnkiRequestsClient = HttpClient
|
|
|
|
|
|
class Syncer:
|
|
def sync(self) -> str:
|
|
pass
|