Skip to content

Commit 99e6938

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.Timestamp.utcnow (#58629)
* DOC: add SA01 pandas.Timestamp.utcnow * DOC: remove SA01 pandas.Timestamp.utcnow * DOC: add SA01 to nattype
1 parent 96ef51e commit 99e6938

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
331331
-i "pandas.Timestamp.tzname SA01" \
332332
-i "pandas.Timestamp.unit SA01" \
333333
-i "pandas.Timestamp.utcfromtimestamp PR01,SA01" \
334-
-i "pandas.Timestamp.utcnow SA01" \
335334
-i "pandas.Timestamp.utcoffset SA01" \
336335
-i "pandas.Timestamp.utctimetuple SA01" \
337336
-i "pandas.Timestamp.value GL08" \

pandas/_libs/tslibs/nattype.pyx

+12
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,18 @@ class NaTType(_NaT):
769769
770770
Return a new Timestamp representing UTC day and time.
771771
772+
See Also
773+
--------
774+
Timestamp : Constructs an arbitrary datetime.
775+
Timestamp.now : Return the current local date and time, which
776+
can be timezone-aware.
777+
Timestamp.today : Return the current local date and time with
778+
timezone information set to None.
779+
to_datetime : Convert argument to datetime.
780+
date_range : Return a fixed frequency DatetimeIndex.
781+
Timestamp.utctimetuple : Return UTC time tuple, compatible with
782+
time.localtime().
783+
772784
Examples
773785
--------
774786
>>> pd.Timestamp.utcnow() # doctest: +SKIP

pandas/_libs/tslibs/timestamps.pyx

+12
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,18 @@ class Timestamp(_Timestamp):
14601460
14611461
Return a new Timestamp representing UTC day and time.
14621462
1463+
See Also
1464+
--------
1465+
Timestamp : Constructs an arbitrary datetime.
1466+
Timestamp.now : Return the current local date and time, which
1467+
can be timezone-aware.
1468+
Timestamp.today : Return the current local date and time with
1469+
timezone information set to None.
1470+
to_datetime : Convert argument to datetime.
1471+
date_range : Return a fixed frequency DatetimeIndex.
1472+
Timestamp.utctimetuple : Return UTC time tuple, compatible with
1473+
time.localtime().
1474+
14631475
Examples
14641476
--------
14651477
>>> pd.Timestamp.utcnow() # doctest: +SKIP

0 commit comments

Comments
 (0)