arrow icon indicating copy to clipboard operation
arrow copied to clipboard

parser: allow (UTC prefix in TzInfoParser

Open priv-kweihmann opened this issue 2 years ago • 1 comments

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

  • [x ] 🧪 Added tests for changed code.
  • [x] 🛠️ All tests pass when run locally (run tox or make test to find out!).
  • [x] 🧹 All linting checks pass when run locally (run tox -e lint or make lint to find out!).
  • [ ] 📚 Updated documentation for changed code.
  • [x] ⏩ Code is up-to-date with the master branch.

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

allow (UTC prefix in TzInfoParser

Input like '(UTC+01:00) Amsterdam, Berlin...' couldn't be parsed by the code. Allow (UTC prefixes to the string and also ignore suffixes to the strings, as remainders are not relevant to the further computation. This particular input was the TZ string send by a remote mail server

priv-kweihmann avatar Mar 22 '22 10:03 priv-kweihmann

Codecov Report

Merging #1099 (8389fdc) into master (4eb070f) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #1099   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2325      2325           
  Branches       449       449           
=========================================
  Hits          2325      2325           
Impacted Files Coverage Δ
arrow/parser.py 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar May 03 '22 23:05 codecov[bot]

@anishnya @jadchaar @krisfremen any feedback on this PR?

priv-kweihmann avatar Aug 22 '22 19:08 priv-kweihmann

Hey @priv-kweihmann, sorry for the delay in looking at this. The changes look good to me and I've approved the PR. Just awaiting confirmation from one @jadchaar, @krisfremen, or @systemcatch here.

anishnya avatar Aug 29 '22 20:08 anishnya