Skip to content

Commit 9823016

Browse files
Fix DeprecationWarning: invalid escape sequence \d (#950)
* Fix DeprecationWarning: invalid escape sequence \d * Resolves #949 * Removes the duplicated line and fixes in one place * Lint * Fix circular import
1 parent 09a0bfa commit 9823016

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

modin/engines/ray/generic/io.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pandas
22

33
import os
4-
import re
54
import numpy as np
65
import math
76
import warnings
@@ -14,8 +13,6 @@
1413
if __execution_engine__ == "Ray":
1514
import ray
1615

17-
PQ_INDEX_REGEX = re.compile("__index_level_\d+__") # noqa W605
18-
1916

2017
class RayIO(BaseIO):
2118

@@ -88,6 +85,7 @@ def read_parquet(cls, path, engine, columns, **kwargs):
8885
"""
8986

9087
from pyarrow.parquet import ParquetFile, ParquetDataset
88+
from modin.pandas.io import PQ_INDEX_REGEX
9189

9290
if cls.read_parquet_remote_task is None:
9391
return super(RayIO, cls).read_parquet(path, engine, columns, **kwargs)

modin/pandas/io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .dataframe import DataFrame
1010
from modin.data_management.factories import BaseFactory
1111

12-
PQ_INDEX_REGEX = re.compile("__index_level_\d+__") # noqa W605
12+
PQ_INDEX_REGEX = re.compile(r"__index_level_\d+__")
1313

1414

1515
# Parquet

0 commit comments

Comments
 (0)