Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Mar 16, 2023
1 parent a06fa6d commit 77a9702
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions hypothesis-python/src/hypothesis/provisional.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
# see https://github.com/HypothesisWorks/hypothesis/pull/3572
TOP_LEVEL_DOMAINS = ["COM"] + sorted((d for d in _tlds if d != "ARPA"), key=len)


class DomainNameStrategy(st.SearchStrategy):
@staticmethod
def clean_inputs(minimum, maximum, value, variable_name):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2014,11 +2014,14 @@ def deferred(definition: Callable[[], SearchStrategy[Ex]]) -> SearchStrategy[Ex]

def domains():
import hypothesis.provisional

return hypothesis.provisional.domains()


@defines_strategy(force_reusable_values=True)
def emails(*, domains: SearchStrategy[str] = LazyStrategy(domains, (), {})) -> SearchStrategy[str]:
def emails(
*, domains: SearchStrategy[str] = LazyStrategy(domains, (), {})
) -> SearchStrategy[str]:
"""A strategy for generating email addresses as unicode strings. The
address format is specified in :rfc:`5322#section-3.4.1`. Values shrink
towards shorter local-parts and host domains.
Expand Down

0 comments on commit 77a9702

Please sign in to comment.