-
Notifications
You must be signed in to change notification settings - Fork 20
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
Overhaul many things #11
Open
NickCrews
wants to merge
21
commits into
thelinuxkid:master
Choose a base branch
from
NickCrews:return-errors
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
See thelinuxkid#10 Switching away from *args makes it so that single inputs are handled consistently. Otherwise, users won't know what sort of response to expect from passing a single input: Will they get a single item back, or a list of length one? Just make it so you always pass a list. Or, in fact, make it so that this accepts any iterable, not just a list or some other iterable with a __len__ method.
Only used inside this one function, so put it there.
See thelinuxkid#10 - still allows you to catch ValueErrors - still acts just like a ValueError - Differentiates between errors from USPS, and the ValueError you get if you supply more than 5 addresses
dicts are ordered in any recent version of python, so just use them. This also fixes up the README to be up to date with the previous changes.
Before we raised an error when the USPS API freacked out about the bad XML, but really this should be fine, just return an empty list This also adds a test for the previous change, where we support iterables of inputs, not just sized ones.
These old error types really don't make sense per their intended use described at https://docs.python.org/3/library/exceptions.html#bltin-exceptions Also update the README to be up to date with previous changes.
IDK why it includes that, but it does.
Before each input had to have the `get()` method, but now it only needs the `__getitem__()` method.
It is recommended to use sttic metadata if possible per https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata
@thelinuxkid here is a PR, let me know if this is too big for you to look at at once, I can cut it down into smaller PRs if so. Thanks for taking a look! |
Thanks Nick. Give me a few days to take a look at this. |
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.
See CHANGELOG.md for the big-picture of what has changed.
Hopefully this isn't too overwhelming. Each commit individually is pretty small and probably understandable. First I would read the CHANGELOG for a high level, and then just browse through each commit individually, they pretty much are self-explanatory. Occasionally I forgot to adjust a test or documentation at the same time as the actual change, but then I went back later and corrected them.
See https://github.com/NickCrews/pyusps/actions?query=branch%3Areturn-errors for an example of what the CI runs look like.