Skip to content

Commit 55e3161

Browse files
committed
added Union type(s) for better type hinting
1 parent af56391 commit 55e3161

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pycatia/base_interfaces/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44
from pathlib import Path
5-
import warnings
5+
from typing import Union
66

77
from pycatia.base_interfaces.base_application import catia_application as catia
88
from pycatia.exception_handling.exceptions import CATIAApplicationException
@@ -48,7 +48,7 @@ class CATIADocHandler:
4848
:param str new_document: (optional) 'Part', 'Product' or 'Drawing'.
4949
"""
5050

51-
def __init__(self, file_name: Path = None, new_document: str = False):
51+
def __init__(self, file_name: Union[Path, None] = None, new_document: Union[str, bool] = False):
5252
"""
5353
:param Path file_name: (optional) path filename to file
5454
:param new_document: (optional) for example 'Part', 'Product' or 'Drawing'.

0 commit comments

Comments
 (0)