Skip to content

Commit ce419a5

Browse files
committed
Lint python code
1 parent 7eb22ad commit ce419a5

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

control/insight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async def update_matrix(
7676
for analyser in matrix:
7777
min: Optional[float] = None
7878
max: Optional[float] = None
79-
sum = 0
79+
sum = 0.0
8080
for country in matrix[analyser]:
8181
v = matrix[analyser][country][0]
8282
min = v if not min or v < min else min

modules/GeoJSONTypes.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from typing import Any, Dict, List, Literal
2+
23
try:
3-
# for python < 3.12
4-
from typing_extensions import TypedDict
5-
except:
6-
from typing import TypedDict
4+
# for python < 3.12
5+
from typing_extensions import TypedDict
6+
except ImportError:
7+
from typing import TypedDict
8+
79

810
class GeoJSONFeature(TypedDict):
911
type: Literal["Feature"]

modules/query_meta.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from collections import defaultdict
22
from typing import Any, Dict, List, Optional
3+
34
try:
4-
# for python < 3.12
5-
from typing_extensions import TypedDict
6-
except:
7-
from typing import TypedDict
5+
# for python < 3.12
6+
from typing_extensions import TypedDict
7+
except ImportError:
8+
from typing import TypedDict
89

910
from asyncpg import Connection
1011

0 commit comments

Comments
 (0)