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

Attempt to exclude columns before determining type #5

Merged
merged 1 commit into from
Aug 16, 2020

Conversation

ZachMyers3
Copy link
Contributor

I have some tables that I'd like to exclude some fields that don't have a python type in sqlalchemy. I'd like to keep them in my model and process them into pydantic manually after the other fields get processed with this utility, but the exclude logic runs after the determination of the type, so I get a NotImplementedError() regardless of exclusion in this case.

I'd like to just move the exclusion logic above the type determination, so that this wouldn't occur in my use-case.

@codecov
Copy link

codecov bot commented May 13, 2020

Codecov Report

Merging #5 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          109       109           
=========================================
  Hits           109       109           
Impacted Files Coverage Δ
pydantic_sqlalchemy/main.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7dcffda...45ed7cb. Read the comment docs.

@ZachMyers3
Copy link
Contributor Author

Anything I have to do to get this merged? I've been holding off development on this until I hear back from this PR.

@tiangolo tiangolo merged commit b8c3121 into tiangolo:master Aug 16, 2020
@tiangolo
Copy link
Owner

Thanks for your contribution! ...and your patience 😄 ☕

This is available in version 0.0.5 🚀

@dsnodgrass
Copy link

@ZachMyers3 thanks for this contribution @tiangolo thanks for including. This saved me from a lot of hackyness.

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.

3 participants