diff --git a/py-polars/polars/utils/various.py b/py-polars/polars/utils/various.py index 1c5960e1e803..0b65b4962324 100644 --- a/py-polars/polars/utils/various.py +++ b/py-polars/polars/utils/various.py @@ -187,8 +187,8 @@ def normalise_filepath(path: str | Path, check_not_directory: bool = True) -> st path = os.path.expanduser(path) # noqa: PTH111 if ( check_not_directory - and os.path.exists(path) - and os.path.isdir(path) # noqa: PTH110 PTH112 + and os.path.exists(path) # noqa: PTH110 + and os.path.isdir(path) # noqa: PTH112 ): raise IsADirectoryError(f"Expected a file path; {path!r} is a directory") return path