Skip to content

Remove unnecessary check: item cannot be None - #16550

Merged
jdavcs merged 1 commit into
galaxyproject:devfrom
jdavcs:dev_libfolder_bug
Aug 14, 2023
Merged

Remove unnecessary check: item cannot be None#16550
jdavcs merged 1 commit into
galaxyproject:devfrom
jdavcs:dev_libfolder_bug

Conversation

@jdavcs

@jdavcs jdavcs commented Aug 14, 2023

Copy link
Copy Markdown
Member

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