Skip to content

Commit 526c224

Browse files
committed
Cleaning up the deprecation logic a bit.
1 parent 20e7ef2 commit 526c224

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/io/xml.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,11 +1127,13 @@ def read_xml(
11271127
"""
11281128
check_dtype_backend(dtype_backend)
11291129

1130-
if (
1131-
not is_file_like(path_or_buffer)
1132-
and not file_exists(path_or_buffer)
1133-
and not is_url(path_or_buffer)
1134-
and not is_fsspec_url(path_or_buffer)
1130+
if not any(
1131+
[
1132+
is_file_like(path_or_buffer),
1133+
file_exists(path_or_buffer),
1134+
is_url(path_or_buffer),
1135+
is_fsspec_url(path_or_buffer),
1136+
]
11351137
):
11361138
warnings.warn(
11371139
"Passing literal xml to 'read_xml' is deprecated and "

0 commit comments

Comments
 (0)