Merge pull request #371 from Aquafina-water-bottle/master
Added Anki 2.1.54 - 2.1.56 to tests
This commit is contained in:
commit
b5f6e86df6
18
.github/workflows/tests.yml
vendored
18
.github/workflows/tests.yml
vendored
@ -48,6 +48,24 @@ jobs:
|
||||
- name: Anki 2.1.53 (Qt6)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.53-qt6
|
||||
- name: Anki 2.1.54 (Qt5)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.54-qt5
|
||||
- name: Anki 2.1.54 (Qt6)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.54-qt6
|
||||
- name: Anki 2.1.55 (Qt5)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.55-qt5
|
||||
- name: Anki 2.1.55 (Qt6)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.55-qt6
|
||||
- name: Anki 2.1.56 (Qt5)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.56-qt5
|
||||
- name: Anki 2.1.56 (Qt6)
|
||||
python: 3.9
|
||||
environment: py39-anki2.1.56-qt6
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
|
@ -350,17 +350,22 @@ class AnkiConnect:
|
||||
# Not a duplicate
|
||||
return 0
|
||||
|
||||
def raiseNotFoundError(self, errorMsg):
|
||||
if anki_version < (2, 1, 55):
|
||||
raise NotFoundError(errorMsg)
|
||||
raise NotFoundError(errorMsg, None, None, None)
|
||||
|
||||
def getCard(self, card_id: int) -> Card:
|
||||
try:
|
||||
return self.collection().getCard(card_id)
|
||||
except NotFoundError:
|
||||
raise NotFoundError('Card was not found: {}'.format(card_id))
|
||||
self.raiseNotFoundError('Card was not found: {}'.format(card_id))
|
||||
|
||||
def getNote(self, note_id: int) -> Note:
|
||||
try:
|
||||
return self.collection().getNote(note_id)
|
||||
except NotFoundError:
|
||||
raise NotFoundError('Note was not found: {}'.format(note_id))
|
||||
self.raiseNotFoundError('Note was not found: {}'.format(note_id))
|
||||
|
||||
def deckStatsToJson(self, due_tree):
|
||||
deckStats = {'deck_id': due_tree.deck_id,
|
||||
|
Loading…
Reference in New Issue
Block a user