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

Support frozenset #38

Merged
merged 1 commit into from
Apr 13, 2018
Merged

Support frozenset #38

merged 1 commit into from
Apr 13, 2018

Conversation

mitar
Copy link
Collaborator

@mitar mitar commented Apr 13, 2018

Fixes #35.

@@ -22,10 +22,10 @@
import collections
from inspect import isfunction, ismethod, isclass, ismodule
try:
from backports.typing import Tuple, Dict, List, Set, Union, Any, \
from backports.typing import Tuple, Dict, List, Set, FrozenSet, Union, Any, \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure if this exists.

@@ -4664,6 +4664,10 @@ class Foo(typing.Generic[T]):
# No exception.
resolve_fw_decl(Foo)

# See: https://github.com/Stewori/pytypes/issues/35
def test_frozenset(self):
self.assertTrue(pytypes.is_of_type(frozenset({1, 2, 'a', None, 'b'}), typing.AbstractSet[typing.Union[str, int, None]]))
Copy link
Owner

Choose a reason for hiding this comment

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

I aim to keep line widths < 80 according to pep 8. I know that many parts of pytypes are far away from pep 8 compliance, but in general I try to converge it to pep 8 rather than further away from it....

This is just cosmetic, so I would not consider it a blocker for accepting this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I often ignore PEP8 a little in tests in my code.

@Stewori
Copy link
Owner

Stewori commented Apr 13, 2018

Thanks for this fix!

@Stewori Stewori merged commit c58f6f1 into Stewori:master Apr 13, 2018
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.

None yet

2 participants