You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/development/contributing_codebase.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ In some cases you may be tempted to use ``cast`` from the typing module when you
223
223
...
224
224
else: # Reasonably only str objects would reach this but...
225
225
obj = cast(str, obj) # Mypy complains without this!
226
-
return obj.upper()
226
+
return obj.upper()
227
227
228
228
The limitation here is that while a human can reasonably understand that ``is_number`` would catch the ``int`` and ``float`` types mypy cannot make that same inference just yet (see `mypy #5206 <https://github.com/python/mypy/issues/5206>`_. While the above works, the use of ``cast`` is **strongly discouraged**. Where applicable a refactor of the code to appease static analysis is preferable
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.19.0.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -1553,7 +1553,7 @@ Bug fixes
1553
1553
- Bug in invalid datetime parsing in ``to_datetime`` and ``DatetimeIndex`` may raise ``TypeError`` rather than ``ValueError`` (:issue:`11169`, :issue:`11287`)
1554
1554
- Bug in ``Index`` created with tz-aware ``Timestamp`` and mismatched ``tz`` option incorrectly coerces timezone (:issue:`13692`)
1555
1555
- Bug in ``DatetimeIndex`` with nanosecond frequency does not include timestamp specified with ``end`` (:issue:`13672`)
1556
-
- Bug in ```Series`` when setting a slice with a ``np.timedelta64`` (:issue:`14155`)
1556
+
- Bug in ``Series`` when setting a slice with a ``np.timedelta64`` (:issue:`14155`)
1557
1557
- Bug in ``Index`` raises ``OutOfBoundsDatetime`` if ``datetime`` exceeds ``datetime64[ns]`` bounds, rather than coercing to ``object`` dtype (:issue:`13663`)
1558
1558
- Bug in ``Index`` may ignore specified ``datetime64`` or ``timedelta64`` passed as ``dtype`` (:issue:`13981`)
1559
1559
- Bug in ``RangeIndex`` can be created without no arguments rather than raises ``TypeError`` (:issue:`13793`)
0 commit comments