No whitespaces allowed surrounding docstring text
39
40
41def _download_file(item):
42 """ Helper function to pass (url, target) to ``download_file``. """ 43 return download_file(item[0], item[1])
44
45
No whitespaces allowed surrounding docstring text
258
259 @staticmethod
260 def parse_prompts(etc_folder):
261 """ Read prompts and prompts-orignal and return as dictionary (id as key). """262 prompts_path = os.path.join(etc_folder, 'PROMPTS')
263 prompts_orig_path = os.path.join(etc_folder, 'prompts-original')
264
No whitespaces allowed surrounding docstring text
209
210 @staticmethod
211 def parse_speaker_info(readme_path):
212 """ Parse speaker info and return tuple (idx, gender). """213 idx = None
214 gender = issuers.Gender.UNKNOWN
215 age_group = issuers.AgeGroup.UNKNOWN
No whitespaces allowed surrounding docstring text
199
200 @staticmethod
201 def data_folders(path):
202 """ Generator which yields a list of valid data directories (corresponds to the content of one .tgz). """203 for item in os.listdir(path):
204 dir_path = os.path.join(path, item)
205 wav_folder = os.path.join(dir_path, 'wav')
No whitespaces allowed surrounding docstring text
103
104 @staticmethod
105 def extract_files(file_paths, target_path):
106 """ Unpack all files to the given path. """107 os.makedirs(target_path, exist_ok=True)
108 extracted = []
109
No whitespaces allowed surrounding docstring text
80 return available_files
81
82 def download_files(self, file_urls, target_path):
83 """ Download all files and store to the given path. """ 84 os.makedirs(target_path, exist_ok=True)
85
86 url_to_target = {}
No whitespaces allowed surrounding docstring text
62
63 @staticmethod
64 def available_files(url):
65 """ Extract and return urls for all available .tgz files. """ 66 req = requests.get(url)
67
68 if req.status_code != 200:
Description
You should avoid spaces at the beginning and at the end of a docstring.