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

style: 💄 typing improvements #186

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

ringohoffman
Copy link
Contributor

@ringohoffman ringohoffman commented Nov 20, 2023

I have a draft for #113, and these are some unrelated changes I made in preparation:

  1. CLIArgs argparse.Namespace dataclass for improved type checking in pybind11_stubgen/__init__.py
  2. not necessary to index sys.version_info, and doing so interferes with VS Code's reachability highlighting
  3. custom all_isinstance TypeGuard in pybind11_stubgen/parser/mixins/fix.py to resolve a type error in arguments to FixedSize vs DynamicSize
  4. use Sequence to accept broader types
  5. typo in FixMissingImport.handle_type?
  6. use comprehension instead of map

CLIArgs argparse.Namespace dataclass for improved data modeling in pybind11_stubgen/__init__.py; not necessary to index sys.version_info; custom all_isinstance TypeGuard in fix.py to resolve a type error in arguments to FixedSize vs DynamicSize; use Sequence to accept broader types; typo in FixMissingImport.handle_type?; use comprehension instead of map
we don't have typing_extensions as a dependency, so we won't be using this for now
@sizmailov sizmailov merged commit af3c6af into sizmailov:master Nov 20, 2023
15 checks passed
@ringohoffman ringohoffman deleted the typing-improvements branch November 20, 2023 05:58
@sizmailov
Copy link
Owner

Thanks!

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