Skip to content

Conversation

nik-k11
Copy link

@nik-k11 nik-k11 commented Oct 28, 2022

Pull Request Checklist

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

  • 🧪 Added tests for changed code.
  • 🛠️ All tests pass when run locally (run tox or make test to find out!).
  • 🧹 All linting checks pass when run locally (run tox -e lint or make lint to find out!).
  • 📚 Updated documentation for changed code.
  • ⏩ 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

  • Add fold kwarg for arrow.get.
  • Remove getattr since Python 2.7/3.5 support is dropped.
  • Make fold a keyword-only argument for Arrow.__init__ per this discussion.

Also please note the fold documentation in ArrowFactory.get. Basically, I only relay the fold kwarg into Arrow.fromdatetime and Arrow.__init__ calls.

Doesn't seem like using fold for timestamps, now calls or dates makes sense. But maybe it should be passed. What do you think?

Closes: #872

Comment on lines -77 to -78
assert hasattr(before, "fold")
assert hasattr(after, "fold")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically checks for presence of the Arrow.fold property, seems unnecessary.

@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (74a759b) to head (4d68b9c).
⚠️ Report is 31 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1139   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10         9    -1     
  Lines         2326      2325    -1     
  Branches       492       495    +3     
=========================================
- Hits          2326      2325    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow fold kwarg in arrow.get()
2 participants