-
-
Notifications
You must be signed in to change notification settings - Fork 975
random.word()
can return undesirable non-alpha characters
#113
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
Labels
c: bug
Something isn't working
p: 1-normal
Nothing urgent
s: accepted
Accepted feature / Confirmed bug
Milestone
Comments
prisis
added a commit
to PrisisForks/faker
that referenced
this issue
Jan 12, 2022
prisis
added a commit
to PrisisForks/faker
that referenced
this issue
Jan 18, 2022
prisis
added a commit
to PrisisForks/faker
that referenced
this issue
Jan 18, 2022
prisis
added a commit
to PrisisForks/faker
that referenced
this issue
Jan 19, 2022
I can work on this. Let me know if you want me to... |
Sure I can assign you. What do you think should be the allowed chars? How would you handle other locales? |
I took a bit different approach. Have a look at #276 |
I will try to create a PR soon that just uses a |
Repository owner
moved this from Awaiting Review
to Done
in Faker Roadmap
Mar 24, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: bug
Something isn't working
p: 1-normal
Nothing urgent
s: accepted
Accepted feature / Confirmed bug
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
The pool of strings from which
random.words()
pulls values includes strings that have parentheses, e.g.Cocos (Keeling) Islands
andKiller Whale (Orca)
. This can result in(Keeling)
and(Orca)
being returned.There's a larger problem here of non-alphabetic characters being returned in words. Obviously some non-alpha characters are desired in words, e.g.
-
, but some are not. We should decide on the set of acceptable characters thatword()
can return and regex the others out.Reproduction
Mock
faker.fake
with the above mentioned values and you can see the bad returns.Additional Info
The text was updated successfully, but these errors were encountered: