template: Add flake8-datetimez#506
Conversation
|
@cwasicki one reason I didn't move forward with this before is because I never had time to investigate if it catches all cases properly, did you tried it in any projects to report if it was working well or not? We also had an attempt to do our own before we knew this one existed, but we based in on I guess having something, even if it is not perfect, is better than nothing, but if you have been bumping into issues with accidentally creating naive datetimes lately, it might be useful to make some test to see if this plugin helps, if you didn't before. |
|
Amazing, thanks a lot for looking into this! I only did a quick test and it discovered a couple of cases. @phillip-wenig-frequenz has actually implemented it in one of our repos and might have some input about potential pitfalls. Will ping you on the PR. |
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Automatically adds the flake8-datetimez dependency to migrated projects. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
|
Rebased, needs a new approval. |
The
flake8-datetimezplugin is a Flake8 extension that makes sure no functions that create naive datetime objects (without a timezone) are not used.Fixes #140.