ynop / audiomate

Consider iterating dictionary PYL-C0201
Anti-pattern
Major
2 occurrences in this check
Consider iterating the dictionary directly instead of calling .keys()
 37        self.num_workers = num_workers
 38
 39        if url is None:
 40            if lang in DOWNLOAD_URL.keys(): 41                self.url = DOWNLOAD_URL[lang]
 42            else:
 43                raise ValueError('There is no voxforge URL present for language {}!'.format(lang))
Consider iterating the dictionary directly instead of calling .keys()
179
180                is_valid_wav = os.path.isfile(wav_path) and ext == '.wav' \
181                    and idx not in self.invalid_utterance_ids
182                has_transcription = basename in prompts.keys()183
184                if is_valid_wav and has_transcription:
185                    if issuer.idx not in corpus.issuers.keys():