اضافه شدن قابلیت مقایسه شماتیک
This commit is contained in:
@@ -5,11 +5,11 @@ from .parser.schdoc_parser import parse_schdoc
|
||||
from .parser.record_decoder import ParseError
|
||||
|
||||
class DocumentParser(Protocol):
|
||||
def __call__(self, data: bytes, filename: str, identifier: str) -> Document: ...
|
||||
def __call__(self, data: bytes, filename: str, identifier: str, **options) -> Document: ...
|
||||
|
||||
PARSERS: dict[str, DocumentParser] = {'schematic': parse_schdoc}
|
||||
|
||||
def parse_document(data: bytes, filename: str, identifier: str, document_type='schematic') -> Document:
|
||||
def parse_document(data: bytes, filename: str, identifier: str, document_type='schematic', **options) -> Document:
|
||||
parser=PARSERS.get(document_type)
|
||||
if parser is None: raise ParseError('Unsupported document type')
|
||||
return parser(data,filename,identifier)
|
||||
return parser(data,filename,identifier,**options)
|
||||
|
||||
مرجع در شماره جدید
مسدود کردن کاربر