-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add datetime field to default_factory example #1301
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 datetime field to default_factory example #1301
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1301 +/- ##
=======================================
Coverage 99.89% 99.89%
=======================================
Files 21 21
Lines 3713 3713
Branches 731 731
=======================================
Hits 3709 3709
Misses 2 2
Partials 2 2 Continue to review full report at Codecov.
|
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.
otherwise LGTM
|
Changed the asserts to prints, left the |
|
single quotes please 😄 |
|
Removed bad quotes, but I noticed that it would have been checked if the lint step included the docs/ folder. I did so and found that there are a bunch of lints (including other double quote usage) in the examples, shall I open another PR to fix those? |
|
up to you, if it's easy you could fix it here, otherwise leave the linting unchanged, and I'll do it elsewhere. |
|
Fairly easy. I added a separate isort/black_docs command in the makefile, to apply an 80-character limit to docs only, matching most of the current formatting, and better for the view inside mkdocs. I did them in separate commits for easy reversion if desired, and it looks like I needed to allow two newlines in the exec_examples script (Fabulous bit of code, that) to let it build properly. |
|
Not sure why this is failing on 3.6 and 3.7, when it says python 3.8 only and has passed before... |
|
Looks like it's a bit more tricky than I anticipated, so I'll revert it for now and leave it for later. |
|
Great, I think the reason I didn't do linting was that it wasn't trivial. I'll fix soon. |
7abfc6e to
66bbb54
Compare
Print instead of assert Remove bad quotes Remove bad quotes from all examples
66bbb54 to
af2bde9
Compare
Change Summary
While looking through the docs, I was happy to find that
default_factorywill be added to 1.5 provisionally, however, I was specifically searching for an example wheredatetimewas being used, and my searches came up fruitless until I checked the closed issues. This adds an example for searchability purposes (and works as expected in my tests)Related issue number
None
Checklist
changes/<pull request or issue id>-<github username>.mdfile added describing change(see changes/README.md for details)