Skip to content

Commit

Permalink
CR 2375: time_type.py -- mark microseconds explicitly. Format test_ty…
Browse files Browse the repository at this point in the history
…pe.py with Black. Add isoformat to spellcheck CI"
  • Loading branch information
Ahmad-Bamba committed Mar 11, 2024
1 parent a5805aa commit dbd48ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ isdir
isfile
isinstance
isnumeric
isoformat
Isr
issubclass
iterdir
Expand Down
4 changes: 2 additions & 2 deletions src/fprime/common/models/serialize/time_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ def to_readable(self, time_zone=None):

# If we could convert to a valid datetime, use that, otherwise, format
if dt:
# datetime.isoformat() returns time string with microsecond
# datetime.isoformat() returns time string with microsecond
# precision.
# This line can be changed for other precisions or needs.
return dt.isoformat()
return dt.isoformat(timespec="microseconds")

Check failure on line 295 in src/fprime/common/models/serialize/time_type.py

View workflow job for this annotation

GitHub Actions / Spell checking

`timespec` is not a recognized word. (unrecognized-spelling)
return "%s: %d.%06ds, context=%d" % (
TimeBase(self.__timeBase.val).name,
self.__secs.val,
Expand Down
1 change: 1 addition & 0 deletions src/fprime/common/models/serialize/type_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@author: reder
Replaced type base class with decorators
"""

import abc

from .type_exceptions import AbstractMethodException
Expand Down

0 comments on commit dbd48ea

Please sign in to comment.