Skip to content

Commit

Permalink
Fixing ci (#132)
Browse files Browse the repository at this point in the history
* fix ci

* fix typechecker
  • Loading branch information
dakk authored Jan 29, 2024
1 parent 3e565d0 commit a768b8d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
sudo apt-get install libgtk-4-dev libgtk-4-1
pip install git+https://github.com/vext-python/vext@32ad4d1c5f45797e244df1d2816f76b60f28e20e
pip install tox
pip install -r requirements.txt
Expand Down
10 changes: 6 additions & 4 deletions gweatherrouting/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import json
import latlon
from geojson_utils import point_in_polygon
from typing import Dict, Callable

try:
from .storage import * # noqa: F401, F403
Expand Down Expand Up @@ -181,7 +182,7 @@ def __delitem__(self, key):


class EventDispatcher:
handlers = {}
handlers: Dict[str, Callable] = {}

def connect(self, evt, f):
if evt not in self.handlers:
Expand All @@ -199,9 +200,10 @@ def dispatch(self, evt, e):
x(e)



class dotdict(dict):
"""dot.notation access to dictionary attributes"""

__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
__getattr__ = dict.get # type: ignore
__setattr__ = dict.__setitem__ # type: ignore
__delattr__ = dict.__delitem__ # type: ignore
22 changes: 11 additions & 11 deletions gweatherrouting/data/extract_icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@

icons = []

for x in gladeFiles:
f = open(x, "r")
for g_file in gladeFiles:
f = open(g_file, "r")
data = f.read()
f.close()

# Get all strings surrounded by property
strings = []

dataIName = data.split('<property name="icon-name">')[1:]
for x in dataIName:
if x.find("</property>") == -1:
for iprop in dataIName:
if iprop.find("</property>") == -1:
continue

strings += [x.split("</property>")[0]]
strings += [iprop.split("</property>")[0]]

dataStock = data.split('<property name="icon-name">')[1:]
for x in dataStock:
if x.find("</property>") == -1:
for data in dataStock:
if data.find("</property>") == -1:
continue

strings += [x.split("</property>")[0]]
strings += [data.split("</property>")[0]]

for y in strings:
if y in icons:
Expand All @@ -50,10 +50,10 @@ def findIcon(x):
return os.path.join(y[0], z)


for x in icons:
l_icn = findIcon(x + ".svg")
for icn in icons:
l_icn = findIcon(icn + ".svg")
if not l_icn:
print("NOTFOUND:", x)
print("NOTFOUND:", icn)
continue

# copy l to ../data/icons/
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ commands =
black .

[testenv:typecheck]
allowlist_externals = mypy # TODO: why?
; allowlist_externals = mypy # TODO: why?
deps =
; {[testenv]deps}
mypy
Expand Down

0 comments on commit a768b8d

Please sign in to comment.