mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Add separate package with file formatters.
This commit is contained in:
parent
ad436f37f8
commit
b6ac85d251
4 changed files with 70 additions and 0 deletions
16
printer-linter/src/printerlinter/formatters/formatter.py
Normal file
16
printer-linter/src/printerlinter/formatters/formatter.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class FileFormatter(ABC):
|
||||
def __init__(self, settings: dict) -> None:
|
||||
""" Yields Diagnostics for file, these are issues with the file such as bad text format or too large file size.
|
||||
|
||||
@param file: A file to generate diagnostics for
|
||||
@param settings: A list of settings containing rules for creating diagnostics
|
||||
"""
|
||||
self._settings = settings
|
||||
|
||||
@abstractmethod
|
||||
def format(self, file: Path) -> None:
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue