Commit graph

17 commits

Author SHA1 Message Date
Damien Elmes
b23b6fbe35 move the separate components back into this monorepo
Earlier today I pushed a change that split this code up into multiple
repos, but that has proved to complicate things too much. So we're
back to a single repo, except the individual submodules are better
separated than they were before.

The README files need updating again; I will push them out soon.

Aside from splitting out the different modules, the sound code has
moved from from anki to aqt.
2020-01-02 19:43:19 +10:00
Michal Pokorný (Rai)
9383a72704 Remove unneeded utf-8 encoding declaration
UTF-8 is the default as of Python 3.
See: https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations
2019-12-27 18:06:06 +01:00
Damien Elmes
17af26dcb5 apply black to all files 2019-12-23 10:34:10 +10:00
Damien Elmes
7399e0bd2b Model->NoteType 2019-12-22 08:58:56 +10:00
Michal Pokorný (Rai)
67a39c58cb Add types for models, templates and field dicts 2019-12-21 12:02:16 +01:00
Damien Elmes
c1587254f4 use isort to tidy up imports 2019-12-20 19:19:29 +10:00
Damien Elmes
6ecfff56c5 add pytype inferred types to anki/
I've corrected some obvious issues, and we can fix others over time.
Mypy tests are currently broken, as adding the type hints has increased
mypy's testing surface.
2019-12-20 11:07:08 +10:00
Arthur Milchior
73bd183b8b Factorize standard models to use other models
As discussed in
https://github.com/dae/anki/pull/340#issuecomment-544749153
2019-10-22 02:43:20 +02:00
Arthur Milchior
db4edf62eb Making newBasicModel private
Following @timrae's advice on the pull request #340.
2019-10-21 07:02:08 +02:00
Arthur Milchior
c14b9e2077 Creating now basic type without doing full sync
There is currently what I believe to be a small bug in anki. You can
clone a note type without doing a full sync, but you can't create
forwardReverse and forwardOptionalReverse note type without doing a
full sync. On the other hand you can clone, and even create any other
basic type without doing a full sync.

This commit simply wants to correct this.

The main trouble is that the method to create a copy of forwardReverse
and forwardOptionalReverse use a copy of the basic model, and add this
copy in the model manager BEFORE adding yet another template. This
commit corrects it by ensuring that the model is added only after all
templates are added, so that anki does not detect any change of a
template in the schema.

In order to do this, I created a method newBasicModel which creates
the basic model without adding it.

By the way, addBasicTypingModel could also use newBasicModel, and then
only change afmt. I didn't do it here because I believe that you want
the change to be minimal, and this correction would not add any
feature, only factorize the code.
2019-10-21 02:30:06 +02:00
Damien Elmes
7aba268d7a tweak type answer note type 2019-05-14 17:05:37 +10:00
Damien Elmes
372d5ed6e8 update copyright and clarify licenses 2019-02-05 14:01:33 +10:00
Damien Elmes
ace01a21bc different cloze colour in night mode 2017-12-20 16:05:28 +10:00
Damien Elmes
a353135af3 add type-in-the-answer note type 2017-08-13 19:42:27 +10:00
Soren I. Bjornstad
519bf5fec7 fix inconsistency in default note type names
The value used internally was changed at some point and the text that
was added to the GUI was not.
2014-10-23 14:28:26 -05:00
Damien Elmes
97a2b81997 fix 'add reverse' template for non-english languages 2014-01-22 02:57:44 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00