Commit graph

11177 commits

Author SHA1 Message Date
sorata
af8fdd8b87
reviews —> review cards (#3347) 2024-08-10 16:53:25 +07:00
Damien Elmes
872ecf481a Update translations 2024-08-08 18:37:33 +07:00
Damien Elmes
afb0790703 Revert "Rename review limit (#3320)"
This reverts commit f0933cf06c.

https://forums.ankiweb.net/t/rename-review-limit/47097/50
2024-08-08 18:37:08 +07:00
David Culley
70a063a3b9
Fix error if regex can't find the filename (#3285)
* fix: treat error if regex doesn't match

* refactor: use assertion to avoid error message
2024-08-07 16:17:37 +07:00
Dillon Baldwin
a2b4b57390
Added name to contributors list as well as addressed issue #3343. Ran ninja check and the build compiled successfully. (#3345) 2024-08-07 16:15:50 +07:00
sorata
e0de13e240
update review limit's name (#3331)
* update review limit's name

* updated tooltip for clarity

this reads more well now, given that new limit isn't max limit

* re-add maximum

* typo
2024-08-05 20:13:53 +07:00
Asuka Minato
e851d0d281
Update about.py (#3330)
* Update about.py

* Update CONTRIBUTORS
2024-08-05 15:56:04 +07:00
Jarrett Ye
1f7a84d68c
Update to FSRS-rs v1.1.4 (#3329)
* update to fsrs-rs v1.1.4
2024-08-05 15:54:10 +07:00
Damien Elmes
ca4393142e Update to Rust 1.80
https://github.com/ankitects/anki/pull/3329#issuecomment-2254538270
2024-08-05 15:37:59 +07:00
cdonat2
b1bf1c3141
Add maximize hint for models.py (#3151) (#3328)
Co-authored-by: Christian Donat <cdonat@tu-berlin.de>
2024-08-05 15:21:18 +07:00
David Culley
bab83ffce0
fix: add proper imports (#3296)
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-08-05 11:34:46 +07:00
David Culley
44380dd62a
Specify Python version for auto-formatters (#3325)
* chore(isort): specify Python version to be assumed

https://pycqa.github.io/isort/docs/configuration/options#python-version

Default is to assume _any_ Python 3 version could be the target.

* chore(black): specify Python target versions

https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#t-target-version

* chore(ruff): specify Python version to be assumed

https://docs.astral.sh/ruff/settings/#target-version

* chore: exclude directories from auto-formatting
2024-08-04 20:54:14 +07:00
David Culley
37a3f4708a
Refactor _addButton method of editor (#3294)
* refactor: simplify f-string

* refactor: use more readable names

* style: separate if-else-clauses by empty lines

* fix: add missing import

Properly `import os`.

* refactor: simplify variable assignment

* refactor: rename variables

* refactor: use f-string

* refactor: reorder variables

* refactor: simplify if-clause with de morgan's laws

* refactor: simplify if-else-construct

* fixup! refactor: rename variables

* Revert "refactor: use f-string"

This reverts commit 1dcb58bdab.

* Revert "fixup! refactor: rename variables"

This reverts commit 813130ba6a.
2024-08-04 20:51:45 +07:00
David Culley
c0349ea9da
Improve exception handling (#3290)
* fix: except only non-system-exiting exceptions

see https://youtu.be/zrVfY9SuO64

* chore: add myself to CONTRIBUTORS file

* refactor: explicitly specify possible exceptions

If an exception is not an Exception, there are only three options left.
see https://docs.python.org/3/library/exceptions.html#exception-hierarchy

* refactor: use BaseException for fallback

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* chore: add myself to contributors
2024-08-04 20:51:13 +07:00
David Culley
a5a39c9302
Fix 'NoneType object is not subscriptable' error (#3286)
* fix: ensure none of the returned values is None

Fixes TypeError 'NoneType' object is not subscriptable

* refactor: reduce code duplication using a function

* refactor: prefer KeyError over None for dicts

If the key is not in the dictionary, we want to raise a KeyError rather
than returning None. That way, we can distinguish between whether the
value was None or the key was not found.

* chore: add myself to CONTRIBUTORS file

* refactor: simplify the code
2024-08-04 20:49:45 +07:00
Damien Elmes
426790bfcb Formatting fix
For some reason this didn't get caught by my pre-push hook :-(
2024-08-01 12:24:38 +07:00
Damien Elmes
1910b9609e Drop non-working tiff support
https://forums.ankiweb.net/t/anki-fails-to-attach-tif-images-to-cards/47609
2024-08-01 12:19:35 +07:00
Expertium
2c30081e3e
SM2 -> SM-2.ftl (#3327)
Relevant: https://github.com/ankitects/anki-manual/pull/218
2024-07-26 21:24:29 +07:00
sorata
c7762d4ec4
Updated tooltips (#3326)
* Update deck-config.ftl

* Update deck-config.ftl

* Update deck-config.ftl

* Update deck-config.ftl

* Update ftl/core/deck-config.ftl
2024-07-26 19:30:35 +07:00
Damien Elmes
656309f385 Update translations 2024-07-26 18:21:01 +07:00
Expertium
f0c211389f
Ignore reviews before -> Ignore cards reviewed before.ftl (#3314)
* Ignore review before -> Ignore cards reviewed before.ftl

* Revert the change.ftl

* Update CONTRIBUTORS
2024-07-26 18:19:51 +07:00
David Culley
0743e6e40e
Update type annotations to use | operator (#3323)
* refactor: update to `|` operator

* refactor: add missing type hint

* refactor: enable `|` operator for older versions

* refactor: remove obsolete import
2024-07-26 18:15:39 +07:00
sorata
f0933cf06c
Rename review limit (#3320)
* maximum reviews/day —> maximum cards/day

* New cards ignore maximum limit
2024-07-26 18:05:33 +07:00
David Culley
3f66f995f7
style: reformat with black (#3324) 2024-07-26 17:58:57 +07:00
David Culley
363a52526e
Update type annotations (#3322)
* refactor: update Callable type hint

* refactor: update type annotations for hooks
2024-07-26 17:57:25 +07:00
David Culley
6c0857395f
Refactor getting the index of a user's language (#3311)
* refactor: rename variables of tuple

* refactor: rename function argument

* refactor: use function to get index of language

* refactor: replace for-loop

* refactor: use variable

* refactor: assert values are not None

To satisfy the type checker.

* refactor: change generator expression to for-loop
2024-07-25 12:46:59 +07:00
Damien Elmes
5c33e5ea65
Revert "About section transparent logo (#3284)" (#3315)
This reverts commit 0b38ecdbc7.
2024-07-22 02:09:40 +07:00
Damien Elmes
faa9efaff7 Latest openssl fix 2024-07-22 02:08:35 +07:00
Jarrett Ye
52ce6e6a6b
Feat/FSRS-5 (#3298)
* Feat/FSRS-5

* adapt the SimulatorConfig of FSRS-5

* update parameters from FSRS-4.5

* udpate to FSRS-rs v1.1.0

* ./ninja fix:minilints

* pass ci

* update cargo-deny to 0.14.24

* udpate to FSRS-rs v1.1.1

* update to fsrs-rs v1.1.2
2024-07-21 21:02:24 +07:00
sorata
5216fa959e
Update AutoAdvance.svelte (#3313) 2024-07-21 20:49:42 +07:00
user1823
dccb7c9b27
Update references to tooltip strings (#3312)
* Update string reference

* Update FsrsOptionsOuter.svelte
2024-07-21 17:24:41 +07:00
sorata
087f957a36
Update Tooltip (#3288)
* Update Tooltip

updated the tooltips as described here: https://forums.ankiweb.net/t/update-tooltips/46849

* Update CONTRIBUTORS

* Update deck-config.ftl

* fixed punctuation, stylistic incoherence, etc.

* Update deck-config.ftl

https://github.com/open-spaced-repetition/fsrs4anki/pull/667

* Changed string requires new key (dae)

* Minor tweaks to tense for clarity (dae)

https://github.com/ankitects/anki/pull/3288#issuecomment-2223384500
2024-07-21 16:44:37 +07:00
Abdo
b05c9d1598
Fix change_notetype_of_notes's docstring (#3304) 2024-07-21 15:26:10 +07:00
David Culley
aa6583cdd1
Refactor ephemeral_card of notes (#3307)
* refactor: fix type annotation

* fix: properly check if argument is None

Don't use Boolean expressions to implement a default value.

* fix: ensure that 'model' is not None

Don't use exceptions to control the flow.

* refactor: simplify if-else construct
2024-07-21 15:25:48 +07:00
David Culley
e213c0a6d1
refactor: use list comprehension (#3308) 2024-07-21 15:21:41 +07:00
Abdo
bb5ed4da9c
Fix unused parent tags getting cleared (#3299)
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-07-21 15:00:39 +07:00
David Culley
63afb0f8c6
Update type annotation syntax (#3283)
* chore: add myself to CONTRIBUTORS file

* refactor: use newer type hints for Union/Optional

* refactor: fix deprecated type annotations

use collections.abc rather than typing

* refactor: use lower letter type annotations

* style: reformat with black

* refactor: remove unused imports

* refactor: add missing imports for type hints

* fixup! refactor: use newer type hints for Union/Optional

* fix: add missing imports for type annotations

* fixup! refactor: use newer type hints for Union/Optional

* fixup! style: reformat with black

* refactor: fix remaining imports re: type hints
2024-07-21 14:00:52 +07:00
Ren Tatsumoto
412e67db3e
replace showWarning with show_warning (#3306)
* replace showWarning with show_warning

* run isort

* change imports
2024-07-21 13:22:47 +07:00
Damien Elmes
194f35617d Switch mask editor to non-conflicting shortcut
In the absence of better ideas, I've added alt

Closes #3276 and #3278
2024-07-21 13:05:56 +07:00
David Culley
af115c7fda
isort: remove settings covered by profile (#3281)
* chore: remove isort settings covered by profile

https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#custom-configuration

* chore: add myself to CONTRIBUTORS file

* chore: use black profile for isort

* chore(isort): fix configuration to skip directories

When overwriting `skip`, `.git` and others would no longer be skipped.

`extend_skip` is the correct option.

* chore(isort): skip directory `qt/bundle`
2024-07-20 18:13:12 +07:00
Damien Elmes
793fdd484d Allow Unicode-3 license 2024-07-20 18:07:06 +07:00
Damien Elmes
e13783b941 Bump cargo deny version 2024-07-20 17:59:08 +07:00
Pedro Schreiber
799912cfe3
keep-text-in-occlusion (#3277) 2024-07-20 17:48:37 +07:00
Ian Samir Yep Manzano
0b38ecdbc7
About section transparent logo (#3284)
* changed anki-logo-thin.png to version with transparent background

* Revert "changed anki-logo-thin.png to version with transparent background"

This reverts commit 4c7e826a73.

* changed anki-logo-thin.png to version with transparent background

* added name to contributors as per contribution guidelines for first PR

* fixed contributors file rather than directly modifying about file
2024-07-20 17:46:12 +07:00
David Culley
9d8782c31c
Simplify the format string (#3293)
* refactor: simplify format string

* chore: add myself to CONTRIBUTORS file
2024-07-10 21:14:51 +07:00
Jean Khawand
56a085bc21
Update base images and introduce health endpoint (#3273)
* Update base images and introduce health endpoint

sync-server: introduce `/health` endpoint to check if the service is reachable.

bump(alpine): bump alpine base image from `3.19` to `3.20`

bump(rust): bump rust-alpine build image from `1.76` to `1.79`

* fix cargo fmt

* add allow clippy::extra_unused_type_parameters

* Remove unused type param (dae)

* Route /health directly (dae)

* Fix for latest axum (dae)
2024-07-10 20:35:21 +07:00
user1823
6ec22e5118
Apply fuzz to SM2 lapse interval and respect max ivl (#3275)
* Apply fuzz to SM2 lapse interval and respect max ivl

Imo, there is no reason for not applying fuzz to SM2 lapse intervals

* Update review.rs

* Format

* Update review.rs

* Update review.rs

* Update review.rs

* Update review.rs
2024-07-10 20:28:21 +07:00
Damien Elmes
88b506413f Exclude gix from cargo-deny 2024-07-10 20:12:06 +07:00
Luc Mcgrady
fa4352f3b6
Fix profile manager used before checked for None (#3272)
* Fix: profile manager used before checked for None

* ./check
2024-07-10 20:00:15 +07:00
Abdo
daf5f68fd5
Limit cloze nesting level (#3264)
* Limit cloze nesting level

* Break cloze rendering at a lower limit
2024-07-10 19:59:31 +07:00