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

Add support to brazilian company IDs (CNPJ) #411

Merged
merged 3 commits into from
Oct 28, 2016

Conversation

lamenezes
Copy link
Contributor

@ladylovelace
Copy link

This would be very helpful.
Good collaboration @lamenezes


@classmethod
def company_id(cls):
digits = random.sample(range(10), 8) + [0, 0, 0, 1]
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of the global random module, you should use the provider's own random instance, so that it can be frozen. Simply call cls.random_sample, instead of random.sample. The API is the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@fcurella
Copy link
Collaborator

Thank you very much! Great work! ✨

@fcurella fcurella merged commit aa0b3a6 into joke2k:master Oct 28, 2016
@lamenezes lamenezes deleted the pt-br-company-id branch October 28, 2016 16:28
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.

3 participants