Use the same MAX_MESH_FILE_SIZE as the UT

This commit is contained in:
Jelle Spijker 2022-12-28 13:11:57 +01:00
parent 498ee3f0da
commit cab248c131

View File

@ -4,12 +4,14 @@ from typing import Iterator
from ..diagnostic import Diagnostic from ..diagnostic import Diagnostic
from .linter import Linter from .linter import Linter
MAX_MESH_FILE_SIZE = 1 * 1024 * 1024 # 1MB
class Meshes(Linter): class Meshes(Linter):
def __init__(self, file: Path, settings: dict) -> None: def __init__(self, file: Path, settings: dict) -> None:
""" Finds issues in model files, such as incorrect file format or too large size """ """ Finds issues in model files, such as incorrect file format or too large size """
super().__init__(file, settings) super().__init__(file, settings)
self._max_file_size = self._settings.get("diagnostic-mesh-file-size", 1e6) self._max_file_size = self._settings.get("diagnostic-mesh-file-size", MAX_MESH_FILE_SIZE)
def check(self) -> Iterator[Diagnostic]: def check(self) -> Iterator[Diagnostic]:
if self._settings["checks"].get("diagnostic-mesh-file-extension", False): if self._settings["checks"].get("diagnostic-mesh-file-extension", False):