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

390 mypy #483

Merged
merged 23 commits into from
Aug 16, 2024
Merged

390 mypy #483

merged 23 commits into from
Aug 16, 2024

Conversation

saeliddp
Copy link
Collaborator

@saeliddp saeliddp commented Aug 9, 2024

Context

#390 -- the goal of this PR is to add a type checker to our CI. We settled on mypy, which seems to be widely used and comes recommended by Philip.

The changes related to adding mypy to CI are just in test_lint.yaml and pyproject.toml. The rest of the changes are fixing files so that they pass the mypy checks.

The majority of type fixes fall into these categories:

  1. we just forgot to add the type hints
  2. we did not handle the possible None type of variables that are typed Optional[<something>]
  3. we didn't use the full path for Qt enums (e.g. we would have Qt.AlignTop instead of Qt.AlignmentFlag.AlignTop). Not sure why exactly this was working, but seems to be fine either way.

@saeliddp saeliddp marked this pull request as ready for review August 9, 2024 23:33
@saeliddp saeliddp requested review from yrkim98 and hughes036 August 9, 2024 23:54
Copy link
Collaborator

@yrkim98 yrkim98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a huge refactor- thank you
Did you replace all instances of Dict and List with builtin types?

Base automatically changed from 447-rename to main August 16, 2024 17:14
@saeliddp
Copy link
Collaborator Author

Did you replace all instances of Dict and List with builtin types?

I replaced them where I saw them, but I wasn't specifically looking for it, so I'm sure a couple slipped by

@saeliddp saeliddp mentioned this pull request Aug 16, 2024
@saeliddp saeliddp merged commit c3f00ee into main Aug 16, 2024
3 checks passed
@saeliddp saeliddp deleted the 390-mypy branch August 16, 2024 17:28
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