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

Remove unnecessary check: item cannot be None #16550

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

jdavcs
Copy link
Member

@jdavcs jdavcs commented Aug 14, 2023

The value of parent_folder cannot be None:

  • _create_folder is called from galaxy.api.library_contents which raises an exception if the value is missing.
  • if the value were indeed None, the subsequent call to parent_folder.add_folder(new_folder) would raise an error.

Bug discovered via mypy after adding type annotations in #16434.

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.

@jdavcs jdavcs added this to the 23.2 milestone Aug 14, 2023
@jdavcs jdavcs requested a review from guerler August 14, 2023 14:45
@jdavcs jdavcs merged commit 6092ff8 into galaxyproject:dev Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants