Commit Graph

2698 Commits

Author SHA1 Message Date
Damien Elmes
30f5a82d35 drop pytype from CI checks
less useful as more type hints are added
2019-12-23 08:40:37 +10:00
Damien Elmes
f7ae4c3ef4 Merge branch 'master' of github.com:dae/anki 2019-12-23 08:32:19 +10:00
Damien Elmes
7d8969a711
Merge pull request #374 from agentydragon/mathjax-test
Fix bug in _removeFormattingFromMathjax
2019-12-23 07:43:16 +10:00
Damien Elmes
73d065ed75
Merge pull request #376 from agentydragon/deduplicate-media
Deduplicate media extension filter with existing list of media extensions
2019-12-23 07:20:26 +10:00
Damien Elmes
0473d70760
Merge pull request #379 from agentydragon/tags-types
Add some type declarations in tags.py
2019-12-23 07:20:05 +10:00
Michal Pokorný (Rai)
36bdb4ebe0 Add some type declarations in tags.py 2019-12-22 14:50:42 +01:00
Michal Pokorný (Rai)
202a31dc5a Add some type declarations in utils.py 2019-12-22 14:47:07 +01:00
Michal Pokorný (Rai)
899305ec41 Deduplicate some code in aqt/editor.py 2019-12-22 14:21:48 +01:00
Michal Pokorný (Rai)
2ae342592c Deduplicate media extension filter with existing list of media extensions 2019-12-22 14:00:59 +01:00
Michal Pokorný (Rai)
5ff0547110 Don't repeat Python regex docs 2019-12-22 12:43:15 +01:00
Damien Elmes
530961f264 js build doesn't require python deps 2019-12-22 19:29:26 +10:00
Damien Elmes
af4d4af55d fix race condition in tmp folder handling 2019-12-22 19:03:20 +10:00
Damien Elmes
59ec442317 add pull_request to github actions 2019-12-22 18:39:14 +10:00
Michal Pokorný (Rai)
2d2f21bfe3 Fix bug in _removeFormattingFromMathjax 2019-12-22 05:47:45 +01:00
Michal Pokorný (Rai)
331781cf45 Document newly found bug in _removeFormattingFromMathjax
Also adds some comments I wrote to help me understand what's going
on in the code.

I hope to fix this bug myself, but I think it might be beyond what
you can do with Python regexes and might require writing a proper
parser.

So, as step 1, I'm adding in a couple comments explaining that the
bug exists and how to reproduce it.
2019-12-22 05:22:18 +01:00
Damien Elmes
b34c43a739 badge fix 2019-12-22 12:32:49 +10:00
Damien Elmes
f33f2f4356 fix failing checks 2019-12-22 12:30:29 +10:00
Damien Elmes
0150056f2b update badge 2019-12-22 12:28:27 +10:00
Damien Elmes
0581e29f88
Merge pull request #372 from glutanimate/addon-type-hints
Add type hints for a few more methods commonly accessed by add-ons
2019-12-22 12:28:07 +10:00
Damien Elmes
e2feb89f47 switch to GitHub workflows for CI
Also drop -j from Make, as it saves little time and makes errors
harder to read.
2019-12-22 12:15:18 +10:00
Damien Elmes
ecfb2af4ee mypy does run on py3.6 2019-12-22 10:34:28 +10:00
Damien Elmes
291472b52b fix race condition in build scripts
- pip dependencies need to be installed sequentially
- move the individual check deps back into a separate file
- qt type hints not required for 'make run'
2019-12-22 10:19:50 +10:00
Glutanimate
cb9d04a0eb Add type hints for a few more methods commonly accessed by add-ons 2019-12-22 00:12:09 +01:00
Damien Elmes
7399e0bd2b Model->NoteType 2019-12-22 08:58:56 +10:00
Damien Elmes
5075fc23f6 remove pytype from 'make check', and split up dev deps 2019-12-22 08:56:47 +10:00
Damien Elmes
079a00653e
Merge pull request #369 from agentydragon/typecheck-models
Add types for models, templates and field dicts
2019-12-22 08:19:40 +10:00
Damien Elmes
a9d745ab5f
Merge pull request #370 from glutanimate/continue-from-addon-config-action
Allow handing config editing back to Anki after calling add-on action
2019-12-22 08:11:31 +10:00
Damien Elmes
70ca4fe557
Merge pull request #367 from agentydragon/ref1
Small TS style changes: Replace 'var' with 'let' or const as appropriate
2019-12-22 08:09:24 +10:00
Glutanimate
32ef53092f Allow handing config editing back to Anki after calling add-on action
Allows add-ons to partially manage their own configuration
while still delegating the actual UI to Anki.
2019-12-21 16:48:05 +01:00
Michal Pokorný (Rai)
67a39c58cb Add types for models, templates and field dicts 2019-12-21 12:02:16 +01:00
Michal Pokorný (Rai)
16d97c8e0a Replace 'const' with 'let' on global scope functions
Also use const where possible.
2019-12-21 11:24:50 +01:00
Damien Elmes
bfcc837939 avoid noreturn for now, as it's not supported on python <3.6.5 2019-12-21 16:54:40 +10:00
Damien Elmes
343e616b2d add py version to about 2019-12-21 16:53:17 +10:00
Damien Elmes
2c535ddd4d
Merge pull request #366 from lovac42/handle_toolTipRole_in_sidebar_model
handle ToolTipRole in SidebarModel
2019-12-21 16:45:12 +10:00
Damien Elmes
f5ddaef04c
add type hint 2019-12-21 16:44:38 +10:00
lovac42
e494441366 added code to handle ToolTipRole in SidebarModel 2019-12-21 01:15:38 -05:00
Damien Elmes
a5f2a73a85
Merge pull request #365 from Arthur-Milchior/updateReqsFalseInTest
add some updateReqs=False in tests
2019-12-21 07:42:49 +10:00
Damien Elmes
f0f9278414
Merge pull request #363 from ig3/bug/new-perday
Use _deckNewLimitSingle in _groupChildrenMain
2019-12-21 07:41:18 +10:00
Damien Elmes
28aa983aa4 mention example in contrib file 2019-12-21 07:38:01 +10:00
Michal Pokorný (Rai)
ce59fad160 Replace 'var' with 'let' or const as appropriate
Also replaces some for-loops over arrays with for..of loops.
2019-12-20 22:35:37 +01:00
Damien Elmes
ed0b3d3374 add an example of how circular imports can be handled
The type name needs to be quoted so it is evaluated after the module
has been initialized.

In the future when we drop support for python 3.6, and mypy is updated,
we will be able to remove the quotes and use the following at
the top of the file instead:

from __future__ import annotations
2019-12-21 07:29:45 +10:00
Arthur Milchior
e835403b8c add some updateReqs=False in tests 2019-12-20 13:25:30 -08:00
Damien Elmes
981b3f34a0 pytype can't handle circular imports 2019-12-21 07:16:26 +10:00
Ian Goodacre
329ca71436 Use _deckNewLimitSingle in _groupChildrenMain 2019-12-21 09:26:51 +13:00
Damien Elmes
59ce08bc4e add type hints section to README.contributing 2019-12-20 20:52:16 +10:00
Damien Elmes
795f36aeb0 add comment about pretty to makefile 2019-12-20 20:37:29 +10:00
Damien Elmes
94a81230f6 Revert "add arg hints to schedulers"
This reverts commit a02d203604.

no longer needed
2019-12-20 19:44:08 +10:00
Damien Elmes
c1587254f4 use isort to tidy up imports 2019-12-20 19:19:29 +10:00
Damien Elmes
638a8515bc add some typing to addcards and main 2019-12-20 18:43:52 +10:00
Damien Elmes
ddac1dd579 a few more typing fixes 2019-12-20 17:55:19 +10:00