Closed oakt closed 4 years ago
Merging #812 into master will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #812 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 1757 1763 +6
Branches 300 302 +2
=========================================
+ Hits 1757 1763 +6
Impacted Files | Coverage Δ | |
---|---|---|
arrow/arrow.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 74450bb...954cf42. Read the comment docs.
Hi @oakt, thanks for the contribution. It seems that the linting CI is failing. Can you run pre-commit run --all-files
to fix the issues and push again?
Unfortunately the pre-commit command isn't working on my device (MacOS), however the code did pass "make lint" initially. Is there another command I can try? Thanks
Hey @oakt, you need to install pre-commit either globally or in the virtual environment: pip install pre-commit. Or you can install it with home brew!
Running make lint requires pre-commit, so you probably already have it in the virtual env. If it runs, you need to add and commit the changes files.
We should probably implement this as an ability to start the week on any day, not just Sunday. Let's revisit this once we have a better implementation strategy.
Pull Request Checklist
Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:
tox
ormake test
to find out!).tox -e lint
ormake lint
to find out!).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
Issue #355 fixed
Changed isoweekday function in arrow.py so it takes in extra parameter startSunday, which is a bool (default false) that determines if week should start on Sunday instead of Monday. If true, it returns (1-7) for (Sunday-Saturday) instead of (Monday-Sunday).
Changed span function to also take in startSunday parameter (via kwargs). If startSunday is true, span will call isoweekday(True) instead of isoweekday(), so span('week') will return a week starting on Sunday and ending on Monday.
Close: #355