-
Notifications
You must be signed in to change notification settings - Fork 1
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
User config for generators #35
Conversation
d7007ed
to
9bfe5cb
Compare
@Iain-S do you know the best way to deal with mypy complaining about missing type stubs for dependencies? The pre-commit fails because of missing type information for pyyaml. |
@mhauru I think we could add |
sqlsynthgen/providers.py
Outdated
|
||
|
||
class TimespanProvider(BaseProvider): | ||
"""A Mimesis provider for timespans, consisting of start datetime, end datetime, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you shorten the opening line of the docstring to <= 80 chars and move the rest to the body? Perhaps:
"""A Mimesis provider for timespans, consisting of start datetime, end datetime, and | |
"""A Mimesis provider for timespans. | |
A triple of start datetime, end datetime, and the timedelta in between. | |
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. We generally stick to 88 chars, right? A special rule for first lines of docstrings to follow the PEP8 max of 79?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It looks like the recommended line length for docstrings and comments is actually 72 chars, regardless of whether you increase the max allowed code line length. Though they don't really give a justification for that.
Implements a method for providing custom generators and user configurations for which generators to use for which tables.