Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: More modern types #150

Merged
merged 8 commits into from
Feb 14, 2024
Merged

Conversation

DanielSchiavini
Copy link
Collaborator

Get rid of List and Tuple. Use list and tuple instead.

@@ -43,7 +43,9 @@ def __repr__(self):


def _exclude_filter(fn: Callable) -> Callable:
def wrapper(*args: Tuple, exclude: Any = None, **kwargs: int) -> SearchStrategy:
def wrapper(
*args: tuple[Any, ...], exclude: Any = None, **kwargs: int
Copy link
Member

Choose a reason for hiding this comment

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

i think this can just be *args: tuple, ...

@@ -62,7 +64,7 @@ def wrapper(*args: Tuple, exclude: Any = None, **kwargs: int) -> SearchStrategy:

def _check_numeric_bounds(
type_str: str, min_value: NumberType, max_value: NumberType
) -> Tuple:
) -> tuple[int | float, int | float]:
Copy link
Member

Choose a reason for hiding this comment

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

i don't think this type signature is even right. it should return some kind of hypothesis strategy.

Copy link
Member

Choose a reason for hiding this comment

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

oops, missed some hidden lines. this seems fine, although i think we can get more specific. either tuple[NumberType, NumberType] or tuple[int, int]

@charles-cooper charles-cooper merged commit 4692160 into vyperlang:master Feb 14, 2024
6 of 8 checks passed
@DanielSchiavini DanielSchiavini deleted the mypy branch October 9, 2024 07:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants