Skip to content

Conversation

@zopieux
Copy link
Contributor

@zopieux zopieux commented Jul 23, 2023

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Description

search_for_models is explicitly typed as taking a singular Path but was given a list because some later function in the stack expects a list. Fixed that to be compatible with the paths. This is the only use of that function.

The list() call is unrelated but removes a type warning since it's supposed to return a list, not a set. I can revert it if requested.

This was found through pylance type errors. Go types!

@psychedelicious
Copy link
Contributor

There are a lot of opportunities to improve the types in the model manager and its routers - thanks for taking care of this one. I dream of a successful mypy run in the future...

If you have any questions about this area of the code, you can ping @StAlKeR7779 or @lstein.

@zopieux
Copy link
Contributor Author

zopieux commented Jul 23, 2023

I dream of a successful mypy run in the future...

Lots of low-hanging fruits already being surfaced by VS Code pylance integration, but I will refrain from fixing those until the codebase enables some formatter. It's too cumbersome right now. Thanks for the quick review!

This was found through pylance type errors. Go types!
@blessedcoolant blessedcoolant enabled auto-merge July 24, 2023 08:01
@blessedcoolant blessedcoolant merged commit 2b65e40 into invoke-ai:main Jul 24, 2023
@zopieux zopieux deleted the fix-types-2 branch July 24, 2023 09:46
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