Commit 394a7e2
authored
## Description
Currently, the `EtlTask` model has a private attribute (`etl_date`)
defined as the `datetime` module, rather than the `datetime.datetime`
type. This produces a warning such as the following:
```
UserWarning: <module 'datetime' from '/usr/lib/python3.11/datetime.py'> is not a Python type
(it may be an instance of an object), Pydantic will allow any object with no validation since we cannot even
enforce that the input is an instance of the given type. To get rid of this error wrap the type with `pydantic.SkipValidation`.
```
This change redefines the attribute as the `datetime.datetime` type.
## Related Issue
Closes #228.
## Motivation and Context
See description above.
## How Has This Been Tested?
Manually. Imported the `EtlTask` and confirmed the warning is no longer
produced.
## Screenshots (if appropriate):
N/A
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
1 parent cca5194 commit 394a7e2
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments