Fix test suite getting type checked accidentally
This commit is contained in:
parent
45d89cfe55
commit
e06d40cb31
2
.github/workflows/ci.py
vendored
2
.github/workflows/ci.py
vendored
@ -44,7 +44,7 @@ def install_deps():
|
|||||||
# needed for zlib for pillow, should not be needed after pillow 8.0
|
# needed for zlib for pillow, should not be needed after pillow 8.0
|
||||||
os.environ['PKG_CONFIG_PATH'] = '/usr/local/opt/zlib/lib/pkgconfig'
|
os.environ['PKG_CONFIG_PATH'] = '/usr/local/opt/zlib/lib/pkgconfig'
|
||||||
cmd = 'pip3 install Pillow pygments'
|
cmd = 'pip3 install Pillow pygments'
|
||||||
if sys.version[:2] < (3, 7):
|
if sys.version_info[:2] < (3, 7):
|
||||||
cmd += ' importlib-resources'
|
cmd += ' importlib-resources'
|
||||||
run(cmd)
|
run(cmd)
|
||||||
|
|
||||||
|
|||||||
@ -12,30 +12,30 @@ from kitty.fast_data_types import LineBuf, Cursor, Screen, HistoryBuf
|
|||||||
|
|
||||||
class Callbacks:
|
class Callbacks:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
self.clear()
|
self.clear()
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data) -> None:
|
||||||
self.wtcbuf += data
|
self.wtcbuf += data
|
||||||
|
|
||||||
def title_changed(self, data):
|
def title_changed(self, data) -> None:
|
||||||
self.titlebuf += data
|
self.titlebuf += data
|
||||||
|
|
||||||
def icon_changed(self, data):
|
def icon_changed(self, data) -> None:
|
||||||
self.iconbuf += data
|
self.iconbuf += data
|
||||||
|
|
||||||
def set_dynamic_color(self, code, data):
|
def set_dynamic_color(self, code, data) -> None:
|
||||||
self.colorbuf += data or ''
|
self.colorbuf += data or ''
|
||||||
|
|
||||||
def set_color_table_color(self, code, data):
|
def set_color_table_color(self, code, data) -> None:
|
||||||
self.ctbuf += ''
|
self.ctbuf += ''
|
||||||
|
|
||||||
def request_capabilities(self, q):
|
def request_capabilities(self, q) -> None:
|
||||||
from kitty.terminfo import get_capabilities
|
from kitty.terminfo import get_capabilities
|
||||||
for c in get_capabilities(q, None):
|
for c in get_capabilities(q, None):
|
||||||
self.write(c.encode('ascii'))
|
self.write(c.encode('ascii'))
|
||||||
|
|
||||||
def use_utf8(self, on):
|
def use_utf8(self, on) -> None:
|
||||||
self.iutf8 = on
|
self.iutf8 = on
|
||||||
|
|
||||||
def desktop_notify(self, osc_code: int, raw_data: str) -> None:
|
def desktop_notify(self, osc_code: int, raw_data: str) -> None:
|
||||||
@ -44,7 +44,7 @@ class Callbacks:
|
|||||||
def open_url(self, url: str, hyperlink_id: int) -> None:
|
def open_url(self, url: str, hyperlink_id: int) -> None:
|
||||||
self.open_urls.append((url, hyperlink_id))
|
self.open_urls.append((url, hyperlink_id))
|
||||||
|
|
||||||
def clear(self):
|
def clear(self) -> None:
|
||||||
self.wtcbuf = b''
|
self.wtcbuf = b''
|
||||||
self.iconbuf = self.titlebuf = self.colorbuf = self.ctbuf = ''
|
self.iconbuf = self.titlebuf = self.colorbuf = self.ctbuf = ''
|
||||||
self.iutf8 = True
|
self.iutf8 = True
|
||||||
|
|||||||
5
test.py
5
test.py
@ -2,6 +2,7 @@
|
|||||||
# vim:fileencoding=utf-8
|
# vim:fileencoding=utf-8
|
||||||
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
||||||
|
|
||||||
|
import importlib
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -14,8 +15,8 @@ def init_env() -> None:
|
|||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
init_env()
|
init_env()
|
||||||
from kitty_tests.main import run_tests # type: ignore
|
m = importlib.import_module('kitty_tests.main')
|
||||||
run_tests()
|
m.run_tests() # type: ignore
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user