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

Add warning for ambiguous library title #1327

Merged

Conversation

JonnyWong16
Copy link
Collaborator

@JonnyWong16 JonnyWong16 commented Dec 29, 2023

Description

Adds a warning for an ambiguous library title when retrieving library section. The last library section matching the name will be returned which is the same as the current behaviour when the lookup dictionary is clobbered.

>> python.library.section("Movies")
UserWarning: Multiple library sections with the same title found, use "sectionByID" instead. Returning the last section.

Fixes #1324

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable

@JonnyWong16 JonnyWong16 force-pushed the bugfix/library_section_name_lookup branch 2 times, most recently from c7d48eb to 8d59630 Compare December 29, 2023 00:08
@JonnyWong16 JonnyWong16 force-pushed the bugfix/library_section_name_lookup branch from 8d59630 to 1b93235 Compare December 29, 2023 00:20
@JonnyWong16 JonnyWong16 merged commit b3ef1c2 into pkkid:master Feb 4, 2024
5 checks passed
@JonnyWong16 JonnyWong16 deleted the bugfix/library_section_name_lookup branch February 4, 2024 20:33
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.

Library section lookup clobbered when multiple libraries have the same title
1 participant