-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[REF] Move remaining locale functions to _config.localization #25861
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
Conversation
Hello @jbrockmendel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-03-25 13:55:53 UTC |
""" | ||
global _initial_defencoding | ||
|
||
encoding = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn’t u check the global first? (if it’s set)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment near the bottom suggests this is kept for debugging purposes related to matplotlib
pandas/_config/display.py
Outdated
""" | ||
|
||
pc_date_yearfirst_doc = """ | ||
: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are pretty orthogonal right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Handling dayfirst and yearfirst finishes breaking the reliance of tslibs on core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right but they shouldn't be in this file. not problem separateing them out, but not here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they're under the display
namespace within options
. where would you put this? could go directly at the bottom of __init__
i guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would put them in another file under _config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done + green
Codecov Report
@@ Coverage Diff @@
## master #25861 +/- ##
==========================================
+ Coverage 91.47% 91.47% +<.01%
==========================================
Files 173 174 +1
Lines 52872 52876 +4
==========================================
+ Hits 48364 48369 +5
+ Misses 4508 4507 -1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #25861 +/- ##
==========================================
+ Coverage 91.47% 91.48% +<.01%
==========================================
Files 173 175 +2
Lines 52872 52877 +5
==========================================
+ Hits 48367 48372 +5
Misses 4505 4505
Continue to review full report at Codecov.
|
thanks @jbrockmendel |
There are a a couple locale-centric functions left in
tm
that have not yet been moved because they depend onpd.options.display.encoding
. This PR implements a minimal_config.display
that allows us to consolidate the locale functions._config.display
also definesdisplay.date_dayfirst
anddisplay.date_yearfirst
, since those are used bytslibs.parsing
. So this completes the process of removingtslib
's dependency oncore
.The existing
get_locales
function has aif PY3
check that is no longer necessary, so this removes the PY2 branch of that.