-
Notifications
You must be signed in to change notification settings - Fork 148
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
Explicit error if _DEFAULT_LOCALE_PATH is None #132
Explicit error if _DEFAULT_LOCALE_PATH is None #132
Conversation
Codecov Report
@@ Coverage Diff @@
## master #132 +/- ##
===========================================
- Coverage 100.00% 99.28% -0.72%
===========================================
Files 9 9
Lines 416 421 +5
===========================================
+ Hits 416 418 +2
- Misses 0 3 +3
Continue to review full report at Codecov.
|
Try to use __file__ if possible but do not crash if not. Instead, when `activate` is used and no explicit path is given, raise an exception explaining why. A better alternative could be use `resource_path` (https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceReader) to find the directory of 'locale'. Unfortunately Python (at least 3.7) only allows to access to files and not folders so we cannot access to 'locale' (a folder) Closes #81
The failing test is about formatting. I don't have problems to fix it, but I cannot make the lint work. Is any document about how to setup an environment for development for |
Thanks for the PR! There's no docs about that, it'd be good to put it into a Anyway, to do all the linting: pip install pre-commit
pre-commit install # optional, this is to enable the pre-commit linting and run when you commit, on just the staged changes
pre-commit run --all-files # to run on all files now |
@eldipa I've created https://github.com/eldipa/humanize/issues/1 to fix the lint. Merging that will update this PR, then we can get a release out soon. Thanks! |
Fix Black, rewrap and capitalise
Thanks! |
Try to use
__file__
if possible but do not crash if not.Instead, when
activate
is used and no explicit path is given, raise anexception explaining why.
A better alternative could be use
resource_path
(https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceReader)
to find the directory of 'locale'.
Unfortunately Python (at least 3.7) only allows to access to files
and not folders so we cannot access to 'locale' (a folder)
Closes #81
Changes proposed in this pull request:
__file__
does not exist