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

Python - local imports cause invalid serialization code #5637

Closed
baywet opened this issue Oct 18, 2024 · 4 comments · Fixed by #5724
Closed

Python - local imports cause invalid serialization code #5637

baywet opened this issue Oct 18, 2024 · 4 comments · Fixed by #5724
Assignees
Labels
Python type:bug A broken experience type:regression A bug from previous release WIP
Milestone

Comments

@baywet
Copy link
Member

baywet commented Oct 18, 2024

kiota generate -d https://raw.githubusercontent.com/APIs-guru/openapi-directory/gh-pages/v2/specs/github.com/api.github.com/1.1.4/openapi.json -l Python

Results in

integration_test/client/models/workspace_user.py:115: error: Argument 2 to "write_object_value" of "SerializationWriter" has incompatible type "ErrorDetails | None"; expected "None"  [arg-type]
@baywet baywet added Python type:bug A broken experience type:regression A bug from previous release labels Oct 18, 2024
@baywet baywet added this to Kiota Oct 18, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Oct 18, 2024
@baywet baywet moved this from Needs Triage 🔍 to Todo 📃 in Kiota Oct 18, 2024
@shemogumbe shemogumbe moved this from Todo 📃 to In Review 💭 in Kiota Nov 4, 2024
@shemogumbe
Copy link
Contributor

shemogumbe commented Nov 4, 2024

The imports were added in this commit 139c958 Reverted in the linked PR

@baywet
Copy link
Member Author

baywet commented Nov 10, 2024

Maybe @andreaTP can help provide more context here? (the question being, why are we adding local imports as opposed to to level ones?)

@github-project-automation github-project-automation bot moved this from In Review 💭 to Done ✔️ in Kiota Nov 11, 2024
@andreaTP
Copy link
Contributor

Sorry for the delay, I'm a bit out of context here.

why are we adding local imports as opposed to to level ones?

If you got to my name with a git blame I think it was not me introducing the "local vs. global" import kind of thing.

@baywet
Copy link
Member Author

baywet commented Nov 11, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python type:bug A broken experience type:regression A bug from previous release WIP
Projects
Status: Done ✔️
Development

Successfully merging a pull request may close this issue.

3 participants