Damien Elmes
69c196b409
.exec_() -> .exec()
...
The former is not supported in PyQt6
2021-10-12 16:17:37 +10:00
Damien Elmes
b9251290ca
run pyupgrade over codebase [python upgrade required]
...
This adds Python 3.9 and 3.10 typing syntax to files that import
attributions from __future___. Python 3.9 should be able to cope with
the 3.10 syntax, but Python 3.8 will no longer work.
On Windows/Mac, install the latest Python 3.9 version from python.org.
There are currently no orjson wheels for Python 3.10 on Windows/Mac,
which will break the build unless you have Rust installed separately.
On Linux, modern distros should have Python 3.9 available already. If
you're on an older distro, you'll need to build Python from source first.
2021-10-04 15:05:48 +10:00
Damien Elmes
d077d9509a
fix study deck->add deck->cancel
2021-07-30 11:35:55 +10:00
Damien Elmes
bc78b6ef17
migrate more ops to CollectionOp
2021-04-06 14:36:13 +10:00
Damien Elmes
3a6f2a993e
move operations into submodule
2021-04-03 16:26:10 +10:00
Damien Elmes
9f4a06abee
ID -> Id in protobuf and Python
...
follow-up to dc81a7fed0
2021-03-27 21:38:20 +10:00
Damien Elmes
0c338bfd53
update no-arg tr references in qt/
2021-03-26 13:48:26 +10:00
Arthur Milchior
6ac1e6477e
NF: DeckID type
2021-03-26 11:14:08 +10:00
Damien Elmes
01161c8ed2
use perform_op() for deck creation
2021-03-22 23:17:07 +10:00
Damien Elmes
0c59c8b591
fix a bunch of qt typing issues uncovered by the following commit
2021-03-19 19:45:21 +10:00
Damien Elmes
5564fd9e13
Merge pull request #1040 from RumovZ/deck-name-err
...
Catch deck rename errors and localise warnings
2021-03-01 09:40:55 +10:00
RumovZ
92cbf168f6
Catch DeckIsFilteredError directly on frontend
2021-02-26 11:32:40 +01:00
bluegreenmagick
c7d8700054
StudyDeck without add button
2021-02-25 07:34:01 +09:00
RumovZ
1dca43f409
Fix #1024 – catch deck rename errors
2021-02-24 13:59:38 +01:00
Damien Elmes
88c002f4eb
convert qt strings to f-strings with flynt
...
Also revealed an incorrect type def in editor.py that mypy wasn't
noticing before :-(
2021-02-11 10:09:06 +10:00
Damien Elmes
bb29ce88f3
minor code cleanups with pyupgrade
...
- pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format
- third-party mpv and winpaths excluded
2021-02-11 09:43:40 +10:00
Damien Elmes
6426edb0ac
more typing updates
2021-02-02 23:31:55 +10:00
Damien Elmes
a56b09b987
add a bunch of return types
2021-02-01 23:53:23 +10:00
Damien Elmes
f15715fb07
add types to various other files
...
Mainly automated with MonkeyType
2021-02-01 22:08:56 +10:00
Arthur Milchior
e0a2d90a68
NF: HelpPage in an enum
...
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
Damien Elmes
94064b8230
convert setWindowFlags call into helper, and fix invalid variables
...
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
6224658c0d
remove context help button
2021-01-06 22:15:48 +09:00
Damien Elmes
ffa26fe4bc
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
Damien Elmes
6418993840
merge bulk of qt/ - designer files still to do
2020-11-17 17:42:43 +10:00
johan456789
06f1aeb052
fix help url paths
2020-10-10 00:38:07 +08:00
Alexander Presnyakov
364725a528
Don't call setCurrentRow if row didn't change
2020-07-13 12:33:36 +03:00
Alexander Presnyakov
e092dadc9a
Allow to choose note type from list by pressing ctrl + row number
2020-07-12 22:15:58 +03:00
Arthur Milchior
3eabe4c3f7
Strip name of added deck
...
There is currently what I believe to be a bug: create a deck " ".
The creation is accepted and the name is renamed to "blank". Instead,
I believe you'd want to strip the deck name before testing its
emptiness.
2020-06-17 11:58:33 +02:00
Damien Elmes
2845941a28
Merge pull request #667 from BlueGreenMagick/refresh-deck-list
...
refresh deck list when adding deck via deckchooser
2020-06-12 09:12:51 +10:00
BlueGreenMagick
20da11f57e
refresh deck list when adding deck via deckchooser
2020-06-11 13:00:10 +09:00
BlueGreenMagick
4e6ba4df78
get deck name after adding deck
2020-06-11 12:50:17 +09:00
BlueGreenMagick
99663be358
add typehint for eventFilter method
2020-05-26 17:08:55 +09:00
Damien Elmes
964a69e54e
handle default deck and filtered deck suppression in the backend
2020-05-15 21:21:10 +10:00
Damien Elmes
eec3fcf87a
use qconnect everywhere, and fix some typing issues
...
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
Arthur Milchior
5d55c4cda2
Sort decks according to their paths
...
Currently it's sorted alphabetically. Because of this, "A::B" appears
between "A9" and "AA" in list of decks.
2020-04-06 22:49:25 +02:00
Arthur Milchior
1126ae293e
forceDefault to force_default
2020-02-22 04:01:42 -08:00
Damien Elmes
abe9f50c14
Revert "Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser"
...
This reverts commit b93d30795c
, reversing
changes made to e16d6055c1
.
More discussion required on https://github.com/ankitects/anki/pull/452
2020-02-21 12:27:39 +10:00
Arthur Milchior
bdf10d9649
method shouldBeDisplayed
2020-02-19 01:56:33 -08:00
Damien Elmes
8310cb7a0e
add qconnect helper and some type hints
...
The type hints allow mypy to check the gui_hook calls, revealing a
bunch of places that are broken as they expect no arguments like the
legacy hooks.
To make mypy happy about PyQt's signal.connect(func), a qconnect()
helper has been added.
2020-01-16 07:41:23 +10:00
Damien Elmes
cab572b63c
remove _hook/_filter suffix
2020-01-15 16:53:24 +10:00
Damien Elmes
89fce1f6b7
migrate addHook/remHook calls
2020-01-15 13:49:26 +10:00
Damien Elmes
5876866565
tweaking the folder names again
...
hopefully that's the last of it
2020-01-03 07:48:38 +10:00