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

Improve seq helper #247

Merged
merged 2 commits into from Oct 29, 2021
Merged

Improve seq helper #247

merged 2 commits into from Oct 29, 2021

Conversation

jairhenrique
Copy link
Contributor

  • Improve validation logic of seq parameters.
  • Validate increment_by when value is an instance of datetime.
  • Fix asserts of tests who tests raise exceptions.

Copy link
Collaborator

@timjklein36 timjklein36 left a comment

Choose a reason for hiding this comment

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

One minor comment about the function prefix. Otherwise, this looks good to me! Thanks for another contribution @jairhenrique!

model_bakery/utils.py Outdated Show resolved Hide resolved
model_bakery/utils.py Outdated Show resolved Hide resolved
@@ -10,6 +10,8 @@

from .timezone import tz_aware

__all__ = ["import_from_str", "get_calling_module", "seq"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is not strictly necessary, I think it should not be introduced. The rest of the model_bakery files do not do this (except for gis.py for some reason).

Copy link
Member

@berinhard berinhard left a comment

Choose a reason for hiding this comment

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

Thanks!

@berinhard berinhard merged commit d0b4474 into model-bakers:main Oct 29, 2021
@jairhenrique jairhenrique deleted the improve_seq branch October 29, 2021 16:49
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.

None yet

3 participants