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

Clean stub files up and have automated checks #35

Open
7 tasks done
rayzchen opened this issue Apr 12, 2022 · 8 comments
Open
7 tasks done

Clean stub files up and have automated checks #35

rayzchen opened this issue Apr 12, 2022 · 8 comments
Labels
OS: Any Occurs on any platform Topic: Module Bugs or enhancements to do with PyUnity code Type: Enhancement New feature or request
Projects
Milestone

Comments

@rayzchen
Copy link
Collaborator

rayzchen commented Apr 12, 2022

  • Make mypy work with PyUnity
  • Finish stub files
  • Identify stub problems
  • Check stub file and source code compatability
  • Fix stubtest
  • Automate mypy
  • Automate stubtest
@rayzchen rayzchen added the Type: Enhancement New feature or request label Apr 12, 2022
@rayzchen rayzchen added this to the 0.9.0 milestone Apr 12, 2022
@rayzchen rayzchen added this to To do soon in PyUnity Apr 21, 2022
@rayzchen
Copy link
Collaborator Author

rayzchen commented May 8, 2022

stubs/generate.py does quite a good job but needs human checking and relies on the coverage of tests/.

@rayzchen rayzchen added the Topic: Module Bugs or enhancements to do with PyUnity code label May 21, 2022
@rayzchen
Copy link
Collaborator Author

Need a better way to check number of arguments or argument names are correct

@rayzchen rayzchen added the OS: Any Occurs on any platform label May 30, 2023
@rayzchen rayzchen moved this from To do soon to In progress in PyUnity May 31, 2023
@rayzchen rayzchen changed the title Rewrite stub files completely Clean stub files up and have automated checks May 31, 2023
@rayzchen
Copy link
Collaborator Author

Investigating mypy and stubtest. Currently facing issues with

savers: Dict[Type[AT], Callable[[AT, Project, Union[str, Path]], None]] = ...
which could be fixed by replacing AT with Asset but won't denote the relationship between the key and the argument. stubtest is also not finding module exports from submodules, but interestingly also seems to not be able to import a simple package structure (see https://github.com/rayzchen/stubtest-bug).

@rayzchen
Copy link
Collaborator Author

Typechecking is almost completely automated, all which is lacking is a GitHub Actions workflow.

@rayzchen
Copy link
Collaborator Author

Waiting for Mypy 1.4.0 to release, hopefully with the bugfix for python/mypy#15397.

@rayzchen
Copy link
Collaborator Author

fee9190 implements mypy testing in ci

@rayzchen
Copy link
Collaborator Author

rayzchen commented Jul 1, 2023

Awaiting python/mypy#15300 to be fixed

@rayzchen
Copy link
Collaborator Author

Currently stubtest succeeds with an ignorefile that ignores __all__, since packages extend it with the __all__ from submodules but stubtest cannot detect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Any Occurs on any platform Topic: Module Bugs or enhancements to do with PyUnity code Type: Enhancement New feature or request
Projects
Status: In progress
PyUnity
In progress
Development

No branches or pull requests

1 participant