37ba8832f8
It looks like pyqt5 is playing dirty and checking the number of args of functions before calling them. When using hooks.wrap, pyqt5 thinks it can pass any amount of arguments (because *args) and you get exceptions like this inside the wrap function, when calling the 'old' function: >TypeError: onFindDupes() takes 1 positional argument but 2 were given This commit fixes it by preserving the signature of the wrapped method, by adding an optional dependency on the "decorator" module. Making it an optional dependency is probably not the wisest idea but since this is a small edge case it might be smoother to start like this. I also added functools.wraps() as a fallback, which won't help much but is slightly more correct. See this article for details: https://hynek.me/articles/decorators/ |
||
---|---|---|
anki | ||
aqt | ||
designer | ||
tests | ||
tools | ||
.gitignore | ||
.travis.yml | ||
anki.1 | ||
anki.desktop | ||
anki.png | ||
anki.xml | ||
anki.xpm | ||
LICENSE | ||
LICENSE.logo | ||
Makefile | ||
README.addons | ||
README.contributing | ||
README.development | ||
README.md | ||
requirements.txt | ||
runanki |
Anki
This is the development branch of Anki.
For stable builds, please see https://apps.ankiweb.net.
For non-developers who want to try this development code, the easiest way is to use a binary package - please see https://anki.tenderapp.com/discussions/beta-testing
If you're a developer, you can learn more about building Anki in README.development.