Fixed multiword city names causing a ValueError#39
Merged
classabbyamp merged 1 commit intomiaowware:masterfrom Aug 5, 2025
Merged
Fixed multiword city names causing a ValueError#39classabbyamp merged 1 commit intomiaowware:masterfrom
classabbyamp merged 1 commit intomiaowware:masterfrom
Conversation
Member
|
how about: zip, state, *city = model_data.address.line2.replace(",", "").split(" ")[::-1]
city = " ".join(city[::-1]) |
Contributor
Author
|
@classabbyamp Well, today I learned a new operator (or rather, learned that the colon slicing operator can be a three-part syntax). Thank you! My test code shown in the description confirms your code works as well as mine, so I've updated the MR with your suggestion. |
|
@ussjoin Thanks for your fix! Do we know if this repo is still maintained? We're having the same issue over here in Van Wert, Ohio! |
Member
|
still maintained, just busy. will try to apply this patch soon |
|
Awesome, the W8FY club thanks you very much for maintaining such a helpful tool for our community @classabbyamp |
classabbyamp
previously approved these changes
Aug 5, 2025
9746e0f to
1fad17f
Compare
Member
|
squashed and rebased to run CI |
1fad17f to
702dcc1
Compare
0x5c
approved these changes
Aug 5, 2025
Member
|
released in 1.1.2: https://pypi.org/project/callsignlookuptools/ |
Contributor
Author
|
Thank you very much @classabbyamp! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaced the (elegant) replace-and-split line2 line with a less-elegant set of lines that additionally handle multiword city names.
Fixes #38
Type of change
How has this been tested?
Test cases chosen because (except for
W1AW, which is just there for a one-word control) these were some of the callsigns I was getting crashes on, when building a "send my giant pile of QSOs at once" tool for my ham radio club's pro-vaccine event. Had I gotten off my butt and tried to send the QSL cards in a more timely fashion, I would have submitted this bugfix earlier, so my apologies for that.Checklist
DEVELOPING.md, if it exists)CHANGELOG.mdupdated if needed (I don't think this merits a CHANGELOG notice)