mvondracek / PA193_mnemonic_Slytherin

BIP39 Mnemonic Phrase Generator and Verifier
0 stars 2 forks source link

Update mnemonic.py #70

Closed ankurlohchab closed 4 years ago

ankurlohchab commented 4 years ago

Hey, While carrying out scan using Prospector, two unused imports "Dict" and "optional " were detected. So it is recommended to remove the unused imports.

codeclimate[bot] commented 4 years ago

Code Climate has analyzed commit 1e863c28 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 1
Clarity 1

View more on Code Climate.

mvondracek commented 4 years ago

Hello, first of all, thank you for your feedback! However, these are false positives. Both Dict and Optional are used. They are from typing package and are used for type hints. If we remove these two types, type checker will complain as it won't know their definition.

We use type hints in comments to maintain compatibility even with Python 3.5, see PEP526.

https://github.com/mvondracek/PA193_mnemonic_Slytherin/blob/3bb3ccfea07a3bb703b99a2f75a3e92b1def090d/pa193mnemonicslytherin/mnemonic.py#L88

https://github.com/mvondracek/PA193_mnemonic_Slytherin/blob/3bb3ccfea07a3bb703b99a2f75a3e92b1def090d/pa193mnemonicslytherin/mnemonic.py#L246