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

Change KeyType to use Any #756

Merged
merged 1 commit into from Mar 24, 2020
Merged

Change KeyType to use Any #756

merged 1 commit into from Mar 24, 2020

Conversation

mxr
Copy link
Contributor

@mxr mxr commented Feb 23, 2020

This is needed to correctly type lookups for keys that use UTCDateTimeAttribute, and future-proof further changes

@garrettheel
Copy link
Member

Generally looks good to me, will just have to figure out what the type error is

@mxr
Copy link
Contributor Author

mxr commented Mar 4, 2020

The command "pytest --cov-report term-missing --cov=pynamodb tests" exited with 0.
11.07s$ if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then mypy .; fi
pynamodb/_compat.py:13: error: Too few arguments for "load_module" of "InspectLoader"
Found 1 error in 1 file (checked 46 source files)
The command "if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then mypy .; fi" exited with 1.

I suspect this is not related to my PR but I can dig around and check on master

@ikonst
Copy link
Contributor

ikonst commented Mar 5, 2020

Perhaps we can type it to be Any? Otherwise it can still conflict with other custom attributes whose types we cannot foresee.

@mxr
Copy link
Contributor Author

mxr commented Mar 21, 2020

Works for me

@mxr mxr changed the title Add datetime.datetime to KeyType Change KeyType to use Any Mar 21, 2020
@garrettheel
Copy link
Member

#763 to fix tests

@mxr
Copy link
Contributor Author

mxr commented Mar 24, 2020

CI is green! @ikonst could you merge this when you have a chance? ty

@ikonst ikonst merged commit ebc8590 into pynamodb:master Mar 24, 2020
@ikonst
Copy link
Contributor

ikonst commented Mar 24, 2020

Thanks @mxr !

@mxr
Copy link
Contributor Author

mxr commented Mar 24, 2020

Thank you!!

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