Skip to content

Commit 74982fe

Browse files
committed
try reverting with exclusion
1 parent 819bae2 commit 74982fe

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pandas/tests/util/test_deprecate_nonkeyword_arguments.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,18 @@ def test_i_signature():
140140

141141
class Foo:
142142
@deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "bar"])
143-
def args(self, non_keyword=None, foobar=None):
143+
def baz(self, bar=None, foobar=None): # pylint: disable=disallowed-name
144144
...
145145

146146

147147
def test_foo_signature():
148-
assert (
149-
str(inspect.signature(Foo.args)) == "(self, non_keyword=None, *, foobar=None)"
150-
)
148+
assert str(inspect.signature(Foo.baz)) == "(self, bar=None, *, foobar=None)"
151149

152150

153151
def test_class():
154152
msg = (
155-
r"In a future version of pandas all arguments of Foo\.args "
156-
r"except for the argument \'non_keyword\' will be keyword-only"
153+
r"In a future version of pandas all arguments of Foo\.baz "
154+
r"except for the argument \'bar\' will be keyword-only"
157155
)
158156
with tm.assert_produces_warning(FutureWarning, match=msg):
159-
Foo().args("qux", "quox")
157+
Foo().baz("qux", "quox")

0 commit comments

Comments
 (0)