1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

python: Type ‘format’ parameter as optional

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jo Sutton
2024-03-05 12:32:16 +13:00
committed by Andrew Bartlett
parent cd7b0720de
commit d8fa0dd62e

View File

@@ -18,7 +18,7 @@
#
import datetime
from typing import NewType
from typing import NewType, Optional
import re
@@ -107,7 +107,7 @@ def nt_time_from_string(s: str) -> NtTime:
return nt_time_from_datetime(dt)
def string_from_nt_time(nttime: NtTime, format:str=None) -> str:
def string_from_nt_time(nttime: NtTime, format: Optional[str] = None) -> str:
"""Format an NtTime date as a string.
If format is not provided, an ISO 8601 string is used.