Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
elecay committed Jan 25, 2024
1 parent 28930e4 commit 90c6297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jsf/schema_types/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BaseSchema(BaseModel):
provider: Optional[str] = Field(None, alias="$provider")
set_state: Optional[Dict[str, str]] = Field(None, alias="$state")
is_nullable: bool = False
allow_none_optionals: float = 0.5
allow_none_optionals: float = Field(0.5, ge=0.0, le=1.0)

@classmethod
def from_dict(cls, d: Dict):
Expand Down
2 changes: 1 addition & 1 deletion jsf/schema_types/string_utils/content_type/text__plain.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def random_fixed_length_sentence(_min: int = 0, _max: int = 50) -> str:
valid_words = list(filter(lambda s: len(s) <= remaining, LOREM))
if len(valid_words) == 0:
break
if len(output) >= _min and random.uniform(0, 1) > 0.5:
if len(output) >= _min and random.uniform(0, 1) > 0.9:
break
output += random.choice(valid_words) + " "
output = output.strip()
Expand Down

0 comments on commit 90c6297

Please sign in to comment.