@@ -102,7 +102,7 @@ def __init__(
102
102
space_group_range : Tuple [int , int ] = (1 , 230 ),
103
103
distance_range : Tuple [float , float ] = (0.0 , 25.0 ),
104
104
max_sites : int = 52 ,
105
- save_dir : Union [str , PathLike [str ]] = path .join ("data" , "preprocessed" ),
105
+ save_dir : Union [str , " PathLike[str]" ] = path .join ("data" , "preprocessed" ),
106
106
):
107
107
"""Instantiate an XtalConverter object with desired ranges and ``max_sites``.
108
108
@@ -124,7 +124,7 @@ def __init__(
124
124
Expected range for pairwise distances between sites, by default (0.0, 25.0)
125
125
max_sites : int, optional
126
126
Maximum number of sites to accomodate in encoding, by default 52
127
- save_dir : Union[str, PathLike[str]]
127
+ save_dir : Union[str, ' PathLike[str]' ]
128
128
Directory to save PNG files via ``func:xtal2png``,
129
129
by default path.join("data", "interim")
130
130
"""
@@ -140,7 +140,7 @@ def __init__(
140
140
141
141
def xtal2png (
142
142
self ,
143
- structures : List [Union [Structure , str , PathLike [str ]]],
143
+ structures : List [Union [Structure , str , " PathLike[str]" ]],
144
144
show : bool = False ,
145
145
save : bool = True ,
146
146
):
@@ -245,12 +245,14 @@ def process_filepaths_or_structures(self, structures):
245
245
246
246
return save_names , S
247
247
248
- def png2xtal (self , images : List [Union [Image .Image , PathLike ]], save : bool = False ):
248
+ def png2xtal (
249
+ self , images : List [Union [Image .Image , "PathLike" ]], save : bool = False
250
+ ):
249
251
"""_summary_
250
252
251
253
Parameters
252
254
----------
253
- images : List[Union[Image.Image, PathLike]]
255
+ images : List[Union[Image.Image, ' PathLike' ]]
254
256
PIL images that (approximately) encode crystal structures.
255
257
256
258
Examples
0 commit comments