Skip to content

Commit 6db5435

Browse files
committed
fixed typechecking and enabled on Travis
1 parent 70cca98 commit 6db5435

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ before_install:
2727
- python -V
2828
- pip -V
2929
- pip3 install --upgrade pip
30-
- pip3 install pyinstaller
30+
- pip3 install mypy pyinstaller
3131

3232
install:
3333
- make build
3434

3535
script:
36+
- make typecheck
3637
- make test
3738
- make test-integration
3839
- make package

aw_qt/manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66
import subprocess
77
import shutil
8-
from typing import Optional, List
8+
from typing import Optional, List, Dict
99

1010
import aw_core
1111

@@ -25,6 +25,7 @@ def _locate_bundled_executable(name: str) -> Optional[str]:
2525
if os.path.isfile(exec_path):
2626
# logger.debug("Found executable for {} in: {}".format(name, exec_path))
2727
return exec_path
28+
return None
2829

2930

3031
def _is_system_module(name) -> bool:

aw_qt/trayicon.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def open_dir(d):
3838

3939

4040
class TrayIcon(QSystemTrayIcon):
41-
def __init__(self, manager: Manager, icon, parent=None, testing=False):
41+
def __init__(self, manager: Manager, icon, parent=None, testing=False) -> None:
4242
QSystemTrayIcon.__init__(self, icon, parent)
4343
self.setToolTip("ActivityWatch" + (" (testing)" if testing else ""))
4444

@@ -196,7 +196,3 @@ def run(manager, testing=False):
196196

197197
# Run the application, blocks until quit
198198
return app.exec_()
199-
200-
201-
if __name__ == "__main__":
202-
run()

0 commit comments

Comments
 (0)