mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
work around some typing inference issues
This commit is contained in:
parent
d2f4450dc0
commit
b935c7e89b
4 changed files with 5 additions and 5 deletions
|
@ -697,7 +697,7 @@ where c.nid == f.id
|
||||||
def _undoReview(self):
|
def _undoReview(self):
|
||||||
data = self._undo[2]
|
data = self._undo[2]
|
||||||
wasLeech = self._undo[3]
|
wasLeech = self._undo[3]
|
||||||
c = data.pop()
|
c = data.pop() # pytype: disable=attribute-error
|
||||||
if not data:
|
if not data:
|
||||||
self.clearUndo()
|
self.clearUndo()
|
||||||
# remove leech tag if it didn't have it before
|
# remove leech tag if it didn't have it before
|
||||||
|
|
|
@ -316,7 +316,7 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
||||||
if not m:
|
if not m:
|
||||||
return
|
return
|
||||||
prop, cmp, val = m.groups()
|
prop, cmp, val = m.groups()
|
||||||
prop = prop.lower()
|
prop = prop.lower() # pytype: disable=attribute-error
|
||||||
# is val valid?
|
# is val valid?
|
||||||
try:
|
try:
|
||||||
if prop == "ease":
|
if prop == "ease":
|
||||||
|
|
|
@ -830,7 +830,7 @@ from cards where did in %s""" % self._limit())
|
||||||
height = self.height
|
height = self.height
|
||||||
if type == "bars":
|
if type == "bars":
|
||||||
conf['series']['bars'] = dict(
|
conf['series']['bars'] = dict(
|
||||||
show=True, barWidth=0.8, align="center", fill=0.7, lineWidth=0)
|
show=True, barWidth=0.8, align="center", fill=0.7, lineWidth=0) # pytype: disable=unsupported-operands
|
||||||
elif type == "barsLine":
|
elif type == "barsLine":
|
||||||
print("deprecated - use 'bars' instead")
|
print("deprecated - use 'bars' instead")
|
||||||
conf['series']['bars'] = dict(
|
conf['series']['bars'] = dict(
|
||||||
|
|
|
@ -458,10 +458,10 @@ class AnkiRequestsClient:
|
||||||
self.session = requests.Session()
|
self.session = requests.Session()
|
||||||
|
|
||||||
def post(self, url, data, headers):
|
def post(self, url, data, headers):
|
||||||
data = _MonitoringFile(data)
|
data = _MonitoringFile(data) # pytype: disable=wrong-arg-types
|
||||||
headers['User-Agent'] = self._agentName()
|
headers['User-Agent'] = self._agentName()
|
||||||
return self.session.post(
|
return self.session.post(
|
||||||
url, data=data, headers=headers, stream=True, timeout=self.timeout, verify=self.verify)
|
url, data=data, headers=headers, stream=True, timeout=self.timeout, verify=self.verify) # pytype: disable=wrong-arg-types
|
||||||
|
|
||||||
def get(self, url, headers=None):
|
def get(self, url, headers=None):
|
||||||
if headers is None:
|
if headers is None:
|
||||||
|
|
Loading…
Reference in a new issue