1- from datetime import date , datetime , time , timedelta
2- from decimal import Decimal
1+ from _typeshed import ReadableBuffer
2+ from datetime import datetime
33from re import Pattern
44from typing import overload
5- from typing_extensions import Final , TypeAlias
5+ from typing_extensions import Final
66
7- from openpyxl .cell . rich_text import CellRichText
7+ from openpyxl .cell import _CellValue , _TimeTypes
88from openpyxl .comments .comments import Comment
99from openpyxl .styles .cell_style import StyleArray
1010from openpyxl .styles .styleable import StyleableObject
11- from openpyxl .worksheet .formula import ArrayFormula , DataTableFormula
1211from openpyxl .worksheet .hyperlink import Hyperlink
1312from openpyxl .worksheet .worksheet import Worksheet
1413
15- _TimeTypes : TypeAlias = datetime | date | time | timedelta
16- _CellValue : TypeAlias = ( # if numpy is installed also numpy bool and number types
17- bool | float | Decimal | str | CellRichText | _TimeTypes | DataTableFormula | ArrayFormula
18- )
19-
2014__docformat__ : Final = "restructuredtext en"
2115TIME_TYPES : Final [tuple [type , ...]]
2216TIME_FORMATS : Final [dict [type [_TimeTypes ], str ]]
@@ -65,14 +59,14 @@ class Cell(StyleableObject):
6559 @overload
6660 def check_string (self , value : None ) -> None : ...
6761 @overload
68- def check_string (self , value : str | bytes ) -> str : ...
62+ def check_string (self , value : str | ReadableBuffer ) -> str : ...
6963 def check_error (self , value : object ) -> str : ...
7064 @property
71- def value (self ) -> _CellValue : ...
65+ def value (self ) -> _CellValue | None : ...
7266 @value .setter
7367 def value (self , value : _CellValue | bytes | None ) -> None : ...
7468 @property
75- def internal_value (self ) -> _CellValue : ...
69+ def internal_value (self ) -> _CellValue | None : ...
7670 @property
7771 def hyperlink (self ) -> Hyperlink | None : ...
7872 @hyperlink .setter
@@ -92,6 +86,7 @@ class MergedCell(StyleableObject):
9286 row : int
9387 column : int
9488 def __init__ (self , worksheet : Worksheet , row : int | None = None , column : int | None = None ) -> None : ...
89+ # Same as Cell.coordinate
9590 @property
9691 def coordinate (self ) -> str : ...
9792 value : str | float | int | datetime | None
0 commit comments