File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 10
10
try :
11
11
__import__ (dependency )
12
12
except ImportError as e :
13
- missing_dependencies .append ("{0 }: {1}" . format ( dependency , str ( e )) )
13
+ missing_dependencies .append (f" { dependency } : { e } " )
14
14
15
15
if missing_dependencies :
16
16
raise ImportError (
33
33
# hack but overkill to use re
34
34
module = str (e ).replace ("cannot import name " , "" )
35
35
raise ImportError (
36
- "C extension: {0 } not built. If you want to import "
36
+ f "C extension: { module } not built. If you want to import "
37
37
"pandas from the source directory, you may need to run "
38
38
"'python setup.py build_ext --inplace --force' to build "
39
- "the C extensions first." . format ( module )
39
+ "the C extensions first."
40
40
)
41
41
42
42
from datetime import datetime
@@ -213,16 +213,16 @@ class Panel:
213
213
return Panel
214
214
elif name in {"SparseSeries" , "SparseDataFrame" }:
215
215
warnings .warn (
216
- "The {} class is removed from pandas. Accessing it from "
216
+ f "The { name } class is removed from pandas. Accessing it from "
217
217
"the top-level namespace will also be removed in the next "
218
- "version" . format ( name ) ,
218
+ "version" ,
219
219
FutureWarning ,
220
220
stacklevel = 2 ,
221
221
)
222
222
223
223
return type (name , (), {})
224
224
225
- raise AttributeError ("module 'pandas' has no attribute '{}'" . format ( name ) )
225
+ raise AttributeError (f "module 'pandas' has no attribute '{ name } '" )
226
226
227
227
228
228
else :
You can’t perform that action at this time.
0 commit comments