Commit graph

38 commits

Author SHA1 Message Date
Damien Elmes
0cb2b3f0c1 update qt/ to 3.8 as well 2020-11-11 21:37:36 +10:00
Damien Elmes
a7f403f0b0 rspy -> pylib/rsbridge 2020-11-02 15:21:12 +10:00
Damien Elmes
ce3b08ac58 initial Bazel conversion
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:

- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
Damien Elmes
02c7a0e339 enable strict equality checks in mypy
Without it, the following code reports no problems:

def foo() -> int:
    return 5
print(foo == 5)
2020-08-03 10:26:40 +10:00
Damien Elmes
c14dc3ec38 check_untyped_defs can now be enabled globally for aqt
A big thanks to Matt and phwoo who put in most of the work to get
to this point.
2020-08-02 10:29:25 +10:00
Matt Krump
85ca0eff78 Turn on check_untyped_defs for aqt.progress 2020-07-31 21:00:08 -06:00
Matt Krump
411accc165 Turn on check_untyped_defs for aqt.main 2020-07-31 20:34:14 -06:00
Damien Elmes
d4d73a4a59 Merge branch 'master' into help-wanted-4-add-type-hints-6 2020-07-31 14:07:59 +10:00
Matt Krump
eef069f2b7 Turn on check_untyped_defs for aqt.emptycards 2020-07-30 18:43:57 -06:00
Matt Krump
1fe46438c0 Turn on check_untyped_defs for aqt.addons 2020-07-30 18:43:57 -06:00
Matt Krump
8feb2acbbf Turn on check_untyped_defs for aqt.webview 2020-07-30 18:43:57 -06:00
Fabian Wood
4a7558f9be Added typehints for qt profiles
* `Any` used for pickle methods, this could probably be improved
with some kind of Callable
* str used for self.base, though this may be a problem for
different OSes. Some type of os.PathLike might be good.
* Line 75, type ignored: mypy was complaining about no. of args,
and kwargs there didn't seem to be needed. Separate issue to test,
though.
2020-07-31 00:56:48 +10:00
Fabian Wood
b23129c3eb added typehints to modelchooser, updated mypy.ini 2020-07-30 15:25:25 +10:00
Matt Krump
d4511e3287 Turn on check_untyped_defs for aqt.exporting 2020-07-28 18:42:22 -06:00
Matt Krump
98d8e1c926 Turn on check_untyped_defs for aqt.editor
* Turn on check_untyped_defs for aqt.browser
* Add type hints
2020-07-28 18:42:22 -06:00
Matt Krump
f27d465d69 Turn on check_untyped_defs for aqt.browser
* Turn on check_untyped_defs for aqt.browser
* Add type hints to browser
2020-07-25 17:31:49 -06:00
Matt Krump
a389e3ca94 Turn on check_untyped_defs for aqt.update
* Turn on check_untyped_defs for aqt.update
2020-07-25 17:31:44 -06:00
Matt Krump
8d988d2b6f Turn on check_untyped_defs for aqt.taglimit
* Add type hints taglimit
* Turn on check_untyped_defs for aqt.taglimit
2020-07-25 15:45:31 -06:00
Damien Elmes
6ad544cf62 Merge branch 'master' into help-wanted-4-add-type-hints-3 2020-07-25 11:43:46 +10:00
Matt Krump
e93ae88cdf Add type hints to importing
* Add type hints to importing
* Turn on type checking for aqt.importing
2020-07-24 12:38:34 -06:00
Matt Krump
38651d6a4e Add type hints to errors
* Add type hints to errors
* Turn on type checking for aqt.errors
2020-07-24 11:20:54 -06:00
Matt Krump
a88f935a8c Add type hints to aqt.models
* Add type hints to aqt.models
* Turn on type checking for aqt.models
2020-07-24 10:59:45 -06:00
Matt Krump
90457e5f20 Add type hints for apt.deckconf
* Add type hints for apt.deckconf
* Turn on check_untyped_defs for apt.deckconf
2020-07-23 21:53:12 -06:00
Matt Krump
51e50c176b Add type hints for apt.dyndeckconf
* Add type hints for apt.dyndeckconf
* Turn on check_untyped_defs for apt.dyndeckconf
2020-07-23 16:04:46 -06:00
BlueGreenMagick
c824d45b2e add typehint to deckchooser.py
every occurunce of self.widget is type ignored
because QHBoxLayout has a method named widget
renaming this property will allow type hints
2020-06-11 14:19:36 +09:00
Damien Elmes
c60229779c switch to new deck tree in deck browser
Saves us having to look up collapsed/filtered as we render, and gives
us type completion.
2020-05-16 10:52:14 +10:00
Damien Elmes
21ac2c14a7 handle scheduling preferences in the backend 2020-05-12 21:13:34 +10:00
Damien Elmes
b757d3db65 check untyped in clayout 2020-05-12 21:13:34 +10:00
Damien Elmes
2641862b56 update fields and models diags
- field changes are now applied when user closes dialog with save
button, in bulk
- models diag now fetches note type and saves it as required, instead
of holding on top a copy that can grow stale as changes are made in
subdialogs
- both dialogs now perform operations in the backend
- note.model() now fetches the note type on the fly, instead of
holding on to a copy that may become stale
2020-05-12 21:13:34 +10:00
Damien Elmes
ece19da49a avoid renaming completer_, as add-ons depend on it 2020-05-08 18:17:57 +10:00
Damien Elmes
cad3d9e74d python formatting+lints 2020-05-08 17:30:27 +10:00
Damien Elmes
4d33b2d8f7 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
evandrocoan
51477a4033 Fixed mypy and pylint not building on Windows
1. error: unused 'type: ignore' comment
2. Module 'pywintypes' has no 'error' member
3. Module 'win32pipe' has no 'SetNamedPipeHandleState' member,
   but source is unavailable. Consider adding this module to
   extension-pkg-whitelist if you want to perform analysis based on
   run-time introspection of living objects.
2020-03-17 19:48:16 -03:00
Alan Du
df55645ced Apply mypy improvements to aqt 2020-02-26 22:27:58 -05:00
Damien Elmes
596a38d0f8 mypy+darkdetect fix 2020-01-31 13:45:25 +10:00
Damien Elmes
2b9a74fe5c mypy fixes 2020-01-21 20:42:06 +10:00
Damien Elmes
9232414095 bump minimum python version from 3.6 to 3.7 2020-01-07 18:34:36 +10:00
Damien Elmes
2a00e0a6b0 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00
Renamed from anki-qt/mypy.ini (Browse further)