mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
python: do not make use of typing.Final for python 3.6
Python 3.6 does not have typing.Final yet BUG: https://bugzilla.samba.org/show_bug.cgi?id=15575 Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit ecc84aa448a962f1a224144bbb65f0cef36a4279)
This commit is contained in:
parent
858090913e
commit
9366f55486
@ -18,18 +18,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from typing import Final, NewType
|
from typing import NewType
|
||||||
|
|
||||||
|
|
||||||
NtTime = NewType("NtTime", int)
|
NtTime = NewType("NtTime", int)
|
||||||
NtTimeDelta = NewType("NtTimeDelta", int)
|
NtTimeDelta = NewType("NtTimeDelta", int)
|
||||||
|
|
||||||
|
|
||||||
NT_EPOCH: Final = datetime.datetime(
|
NT_EPOCH = datetime.datetime(
|
||||||
1601, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc
|
1601, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc
|
||||||
)
|
)
|
||||||
NT_TICKS_PER_μSEC: Final = 10
|
NT_TICKS_PER_μSEC = 10
|
||||||
NT_TICKS_PER_SEC: Final = NT_TICKS_PER_μSEC * 10**6
|
NT_TICKS_PER_SEC = NT_TICKS_PER_μSEC * 10**6
|
||||||
|
|
||||||
|
|
||||||
def _validate_nt_time(nt_time: NtTime) -> None:
|
def _validate_nt_time(nt_time: NtTime) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user