Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/excelalchemy/codecs/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def format_display_value(
case datetime():
return value.strftime(presentation.python_date_format)
case int() | float():
return datetime.fromtimestamp(int(value) / MILLISECOND_TO_SECOND).strftime(presentation.python_date_format)
return datetime.fromtimestamp(int(value) / MILLISECOND_TO_SECOND).strftime(
presentation.python_date_format
)
case _:
return str(value) if value is not None else ''

Expand Down
8 changes: 4 additions & 4 deletions src/excelalchemy/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ class RuntimeFieldBinding:
def make_unique_label(self, *, label: Label) -> UniqueLabel:
if self.parent_label is None:
raise RuntimeError(msg(MessageKey.PARENT_LABEL_EMPTY_RUNTIME))
unique_label = (
f'{self.parent_label}{UNIQUE_HEADER_CONNECTOR}{label}' if self.parent_label != label else label
)
unique_label = f'{self.parent_label}{UNIQUE_HEADER_CONNECTOR}{label}' if self.parent_label != label else label
return UniqueLabel(unique_label)

def make_unique_key(self, *, key: Key | None) -> UniqueKey:
Expand Down Expand Up @@ -158,7 +156,9 @@ def comment_hint(self) -> str:
def comment_options(self) -> str:
if self.options is None:
return ''
return dmsg(MessageKey.COMMENT_OPTIONS, value=MULTI_CHECKBOX_SEPARATOR.join(option.name for option in self.options))
return dmsg(
MessageKey.COMMENT_OPTIONS, value=MULTI_CHECKBOX_SEPARATOR.join(option.name for option in self.options)
)

@property
def comment_fraction_digits(self) -> str:
Expand Down