Skip to content

Commit 27616e7

Browse files
committed
Revert "Merge branch 'newfeature' of https://github.com/lfffkh/pandas into newfeature"
This reverts commit a0ca4db, reversing changes made to 0b7d2a0.
1 parent a0ca4db commit 27616e7

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ minimum_pre_commit_version: 2.15.0
22
exclude: ^LICENSES/|\.(html|csv|svg)$
33
# reserve "manual" for relatively slow hooks which we still want to run in CI
44
default_stages: [
5-
pre-commit,
6-
pre-merge-commit,
7-
pre-push,
5+
commit,
6+
merge-commit,
7+
push,
88
prepare-commit-msg,
99
commit-msg,
1010
post-checkout,

ci/code_checks.sh

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
140140
-i "pandas.errors.OutOfBoundsTimedelta SA01" \
141141
-i "pandas.errors.PerformanceWarning SA01" \
142142
-i "pandas.errors.PossibleDataLossError SA01" \
143+
-i "pandas.errors.PossiblePrecisionLoss SA01" \
143144
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
144145
-i "pandas.errors.UnsortedIndexError SA01" \
145146
-i "pandas.errors.UnsupportedFunctionCall SA01" \

pandas/core/strings/accessor.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,7 @@ def _validate(data):
255255
inferred_dtype = lib.infer_dtype(values, skipna=True)
256256

257257
if inferred_dtype not in allowed_types:
258-
raise AttributeError(
259-
f"Can only use .str accessor with string values, not {inferred_dtype}"
260-
)
258+
raise AttributeError("Can only use .str accessor with string values!")
261259
return inferred_dtype
262260

263261
def __getitem__(self, key):

pandas/errors/__init__.py

-4
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,6 @@ class PossiblePrecisionLoss(Warning):
691691
When the column value is outside or equal to the int64 value the column is
692692
converted to a float64 dtype.
693693
694-
See Also
695-
--------
696-
DataFrame.to_stata : Export DataFrame object to Stata dta format.
697-
698694
Examples
699695
--------
700696
>>> df = pd.DataFrame({"s": pd.Series([1, 2**53], dtype=np.int64)})

pandas/tests/series/accessors/test_str_accessor.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ def test_str_attribute(self):
1515

1616
# str accessor only valid with string values
1717
ser = Series(range(5))
18-
msg = "Can only use .str accessor with string values, not integer"
19-
with pytest.raises(AttributeError, match=msg):
18+
with pytest.raises(AttributeError, match="only use .str accessor"):
2019
ser.str.repeat(2)
2120

2221
def test_str_accessor_updates_on_inplace(self):

0 commit comments

Comments
 (0)