Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofix for similar letters #57

Merged
merged 4 commits into from
Jun 19, 2020
Merged

Autofix for similar letters #57

merged 4 commits into from
Jun 19, 2020

Conversation

LuminousXLB
Copy link
Contributor

@LuminousXLB LuminousXLB commented Jun 13, 2020

fix #54

Copy link
Owner

@keis keis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

A couple of remarks that it would be great if you could fix but otherwise looking good!

base58/__init__.py Outdated Show resolved Hide resolved
test_base58.py Show resolved Hide resolved
base58/__init__.py Outdated Show resolved Hide resolved
Copy link
Owner

@keis keis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keyword only arguments

base58/__init__.py Outdated Show resolved Hide resolved
base58/__init__.py Outdated Show resolved Hide resolved
base58/__init__.py Outdated Show resolved Hide resolved
@LuminousXLB
Copy link
Contributor Author

It seems that there's something wrong with pytest_cov?

@keis
Copy link
Owner

keis commented Jun 16, 2020

Huh yeah, looks like a new version was causing some issues. Fixed on master!

Could you rebase and also squash the commits together?

@LuminousXLB
Copy link
Contributor Author

It failed for python 3.5

@keis
Copy link
Owner

keis commented Jun 16, 2020

ah looks like the mypy type checker is failing in the__main__ module, makes sense considering the functions don't have the same signature anymore.

mypy is only being run on 3.5 so that's why it's only failing that build

@keis
Copy link
Owner

keis commented Jun 16, 2020

Typing that bit explicitly solves it

    fmap: Dict[Tuple[bool, bool], Callable[[bytes], bytes]] = {
        (False, False): b58encode,
        (False, True): b58encode_check,
        (True, False): b58decode,
        (True, True): b58decode_check
    }
    fun = fmap[(args.decode, args.check)]

@keis
Copy link
Owner

keis commented Jun 17, 2020

Oh that kind of annotation is only 3.6+

hmm, I don't think it's time to drop 3.5 already. I need to think about this one

base58/__main__.py Outdated Show resolved Hide resolved
This syntax is not supported on python 3.5 so this old syntax needs to be used until support is dropped for 3.5
@keis keis merged commit 258ceaa into keis:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more Fault Tolerance
2 participants