Skip to content

Add typehints to codegenerator and typedesc #369

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

Merged

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented Nov 3, 2022

related to #327

To facilitate code modification for the addition of type stub generating feature, I first added type annotations to typedesc and codegenerator.

There are a few things I noticed.

  • It is better to use isinstance(t, T) rather than type(t) is T for type-narrowing.
  • typedesc objects and the tlbparser processes are tightly coupled. There are rewriting attributes and manipulating mutable objects directly.

@junkmd junkmd changed the title Add typehints to codegen and typedesc Add typehints to codegenerator and typedesc Nov 3, 2022
vasily-v-ryabov added a commit to vasily-v-ryabov/pywinauto that referenced this pull request Nov 7, 2022
@vasily-v-ryabov vasily-v-ryabov merged commit 54e119d into enthought:master Nov 8, 2022
@junkmd junkmd deleted the add_typehints_to_codegen_and_typedesc branch November 8, 2022 09:31
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.

2 participants