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

[24.1] Add TypedDict for JobsSummary #18418

Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jun 17, 2024

Fixes:

lib/galaxy/managers/jobs.py:866: error: Unsupported target for indexed
assignment ("object")  [index]
                    rval["states"][row[0]] = row[1]

in mypy.

(Please replace this header with a description of your pull request. Please include BOTH what you did and why you made the changes. The "why" may simply be citing a relevant Galaxy issue.)
(If fixing a bug, please add any relevant error or traceback)
(For UI components, it is recommended to include screenshots or screencasts)

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Fixes:
```
lib/galaxy/managers/jobs.py:866: error: Unsupported target for indexed
assignment ("object")  [index]
                    rval["states"][row[0]] = row[1]
```
in mypy.
@mvdbeek mvdbeek force-pushed the fix_mypy_assignment_jobs_summary branch from ac827cb to b7a4a5f Compare June 18, 2024 07:26
@mvdbeek mvdbeek requested a review from a team June 18, 2024 07:26
@@ -26,6 +27,7 @@
)
from sqlalchemy.orm import aliased
from sqlalchemy.sql import select
from typing_extensions import TypedDict
Copy link
Member

Choose a reason for hiding this comment

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

It can be imported from typing since 24.1 is Python>=3.8 and this is not required by Pulsar?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are multiple other locations where we're importing TypedDict from typing_extensions, I'll make a pass at them in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@mvdbeek mvdbeek merged commit f42af82 into galaxyproject:release_24.1 Jun 18, 2024
41 of 49 checks passed
@nsoranzo nsoranzo deleted the fix_mypy_assignment_jobs_summary branch June 18, 2024 14:59
@galaxyproject galaxyproject deleted a comment from github-actions bot Jun 19, 2024
@jdavcs jdavcs added this to the 24.1 milestone Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants