Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Aug 6, 2023
1 parent 9bb44b7 commit 702a734
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/mapfile_parser/mapfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import dataclasses
import re
from typing import Generator
from typing import Any, Generator
from pathlib import Path

from .progress_stats import ProgressStats
Expand Down Expand Up @@ -60,8 +60,8 @@ def printAsCsv(self):
print(f"{self.name},{self.vram:08X},{self.size}")


def toJson(self) -> dict:
result = {
def toJson(self) -> dict[str, Any]:
result: dict[str, Any] = {
"name": self.name,
"vram": self.getVramStr(),
"size": self.serializeSize(),
Expand Down Expand Up @@ -178,8 +178,8 @@ def printAsCsv(self, printVram: bool=True):
print(f"{self.filepath},{self.segmentType},{symCount},{maxSize},{self.size},{averageSize:0.2f}")


def toJson(self) -> dict:
fileDict = {
def toJson(self) -> dict[str, Any]:
fileDict: dict[str, Any] = {
"filepath": str(self.filepath),
"segmentType": self.segmentType,
"vram": self.serializeVram(),
Expand Down Expand Up @@ -524,13 +524,13 @@ def printSymbolsCsv(self):
return


def toJson(self) -> dict:
def toJson(self) -> dict[str, Any]:
filesList = []

for file in self.filesList:
filesList.append(file.toJson())

result = {
result: dict[str, Any] = {
"files": filesList
}
return result
Expand Down

0 comments on commit 702a734

Please sign in to comment.