Skip to content

Commit

Permalink
Lint python code
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed May 1, 2024
1 parent 7eb22ad commit ce419a5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion control/insight.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def update_matrix(
for analyser in matrix:
min: Optional[float] = None
max: Optional[float] = None
sum = 0
sum = 0.0
for country in matrix[analyser]:
v = matrix[analyser][country][0]
min = v if not min or v < min else min
Expand Down
10 changes: 6 additions & 4 deletions modules/GeoJSONTypes.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from typing import Any, Dict, List, Literal

try:
# for python < 3.12
from typing_extensions import TypedDict
except:
from typing import TypedDict
# for python < 3.12
from typing_extensions import TypedDict
except ImportError:
from typing import TypedDict


class GeoJSONFeature(TypedDict):
type: Literal["Feature"]
Expand Down
9 changes: 5 additions & 4 deletions modules/query_meta.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from collections import defaultdict
from typing import Any, Dict, List, Optional

try:
# for python < 3.12
from typing_extensions import TypedDict
except:
from typing import TypedDict
# for python < 3.12
from typing_extensions import TypedDict
except ImportError:
from typing import TypedDict

from asyncpg import Connection

Expand Down

0 comments on commit ce419a5

Please sign in to comment.