File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
src/firebase_functions/private Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ def timestamp_conversion(time) -> _dt.datetime:
409409 """
410410 # Handle Firebase Timestamp object case
411411 # Accept dict-like objects, or python objects with 'seconds' and 'nanoseconds' attributes
412- if hasattr (time , ' seconds' ) and hasattr (time , ' nanoseconds' ):
412+ if hasattr (time , " seconds" ) and hasattr (time , " nanoseconds" ):
413413 # Use UTC time
414414 return _dt .datetime .fromtimestamp (
415415 time .seconds + time .nanoseconds / 1_000_000_000 , tz = _dt .timezone .utc
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ def test_timestamp_conversion_with_object():
196196 """
197197 Testing timestamp_conversion works with objects that have seconds and nanoseconds attributes.
198198 """
199+
199200 class Timestamp :
200201 def __init__ (self , seconds , nanoseconds ):
201202 self .seconds = seconds
@@ -256,6 +257,7 @@ def test_timestamp_conversion_errors():
256257 """
257258 Testing timestamp_conversion raises appropriate errors for invalid inputs.
258259 """
260+
259261 class IncompleteTimestamp :
260262 def __init__ (self , nanoseconds ):
261263 self .nanoseconds = nanoseconds
@@ -274,4 +276,3 @@ def __init__(self, nanoseconds):
274276
275277 with pytest .raises (ValueError ):
276278 timestamp_conversion (None )
277-
You can’t perform that action at this time.
0 commit comments