mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
Format code with black
This commit is contained in:
parent
d5df8f8d85
commit
6ff9452656
1 changed files with 8 additions and 9 deletions
|
|
@ -9,7 +9,9 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Dynamisch den Pfad zu 'anki_helpers' ergänzen
|
# Dynamisch den Pfad zu 'anki_helpers' ergänzen
|
||||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
|
project_root = os.path.abspath(
|
||||||
|
os.path.join(os.path.dirname(__file__), "..", "..", "..")
|
||||||
|
)
|
||||||
anki_helpers_path = os.path.join(project_root, "anki")
|
anki_helpers_path = os.path.join(project_root, "anki")
|
||||||
sys.path.insert(0, anki_helpers_path)
|
sys.path.insert(0, anki_helpers_path)
|
||||||
|
|
||||||
|
|
@ -153,7 +155,6 @@ body { direction: ltr !important; }
|
||||||
print("todayStats wurde aufgerufen")
|
print("todayStats wurde aufgerufen")
|
||||||
b = self._title("Today")
|
b = self._title("Today")
|
||||||
|
|
||||||
|
|
||||||
# studied today
|
# studied today
|
||||||
lim = self._revlogLimit()
|
lim = self._revlogLimit()
|
||||||
if lim:
|
if lim:
|
||||||
|
|
@ -169,7 +170,7 @@ sum(case when type = {REVLOG_CRAM} then 1 else 0 end) /* filter */
|
||||||
from revlog where type != {REVLOG_RESCHED} and id > ? """
|
from revlog where type != {REVLOG_RESCHED} and id > ? """
|
||||||
+ lim,
|
+ lim,
|
||||||
(self.col.sched.day_cutoff - 86400) * 1000,
|
(self.col.sched.day_cutoff - 86400) * 1000,
|
||||||
)
|
)
|
||||||
cards = cards or 0
|
cards = cards or 0
|
||||||
thetime = thetime or 0
|
thetime = thetime or 0
|
||||||
failed = failed or 0
|
failed = failed or 0
|
||||||
|
|
@ -204,7 +205,7 @@ from revlog where type != {REVLOG_RESCHED} and id > ? """
|
||||||
where lastIvl >= 21 and id > ?"""
|
where lastIvl >= 21 and id > ?"""
|
||||||
+ lim,
|
+ lim,
|
||||||
(self.col.sched.day_cutoff - 86400) * 1000,
|
(self.col.sched.day_cutoff - 86400) * 1000,
|
||||||
)
|
)
|
||||||
b += "<br>"
|
b += "<br>"
|
||||||
if mcnt:
|
if mcnt:
|
||||||
b += "Correct answers on mature cards: %(a)d/%(b)d (%(c).1f%%)" % dict(
|
b += "Correct answers on mature cards: %(a)d/%(b)d (%(c).1f%%)" % dict(
|
||||||
|
|
@ -227,10 +228,8 @@ from revlog where type != {REVLOG_RESCHED} and id > ? """
|
||||||
b += "Average/day: 5.5<br>"
|
b += "Average/day: 5.5<br>"
|
||||||
b += "Low activity days: 3<br>"
|
b += "Low activity days: 3<br>"
|
||||||
|
|
||||||
|
|
||||||
return b
|
return b
|
||||||
|
|
||||||
|
|
||||||
# Due and cumulative due
|
# Due and cumulative due
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
@ -334,7 +333,7 @@ group by day order by day"""
|
||||||
% (self._limit(), lim),
|
% (self._limit(), lim),
|
||||||
self.col.sched.today,
|
self.col.sched.today,
|
||||||
chunk,
|
chunk,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Added, reps and time spent
|
# Added, reps and time spent
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
@ -547,7 +546,7 @@ group by day order by day"""
|
||||||
% lim,
|
% lim,
|
||||||
self.col.sched.day_cutoff,
|
self.col.sched.day_cutoff,
|
||||||
chunk,
|
chunk,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _done(self, num: int | None = 7, chunk: int = 1) -> Any:
|
def _done(self, num: int | None = 7, chunk: int = 1) -> Any:
|
||||||
lims = []
|
lims = []
|
||||||
|
|
@ -880,7 +879,7 @@ from revlog where type in ({REVLOG_LRN},{REVLOG_REV},{REVLOG_RELRN}) %s
|
||||||
group by hour having count() > 30 order by hour"""
|
group by hour having count() > 30 order by hour"""
|
||||||
% lim,
|
% lim,
|
||||||
self.col.sched.day_cutoff - (rolloverHour * 3600),
|
self.col.sched.day_cutoff - (rolloverHour * 3600),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Cards
|
# Cards
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue