Skip to content

Commit

Permalink
chore: use from __future__ import annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Birdi7 committed Dec 21, 2022
1 parent 2cec185 commit 0f7e2ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tablib/formats/_xlsx.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
""" Tablib - XLSX Support.
"""
from __future__ import annotations

import re
from io import BytesIO
from typing import Optional, Union

from openpyxl.reader.excel import ExcelReader, load_workbook
from openpyxl.styles import Alignment, Font
Expand Down Expand Up @@ -38,7 +38,7 @@ def detect(cls, stream):
@classmethod
def export_set(
cls, dataset, freeze_panes=True, invalid_char_subst="-",
column_width: Optional[Union[str, int]] = "adaptive"
column_width: str | int | None = "adaptive"
):
"""Returns XLSX representation of Dataset.
Expand Down Expand Up @@ -180,7 +180,7 @@ def dset_sheet(cls, dataset, ws, freeze_panes=True):

@classmethod
def _adapt_column_width(cls, worksheet,
width: Optional[Union[str, int]]) -> None:
width: str | int | None) -> None:
if width is None:
return

Expand Down

0 comments on commit 0f7e2ef

Please sign in to comment.