-
Notifications
You must be signed in to change notification settings - Fork 446
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
Fix pybabel update --init-missing
not creating parent directory
#1142
base: master
Are you sure you want to change the base?
Conversation
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.
Could we get some sort of test for this? Does the (re)use of InitCatalog
do exactly the same thing as the old code?
tmpInitCatalog = InitCatalog(self.distribution) | ||
tmpInitCatalog.output_dir = None | ||
tmpInitCatalog.output_file = filename | ||
tmpInitCatalog.input_file = self.input_file | ||
tmpInitCatalog.locale = self.locale | ||
tmpInitCatalog.domain = self.domain | ||
tmpInitCatalog.no_wrap = self.no_wrap | ||
tmpInitCatalog.width = self.width | ||
tmpInitCatalog.finalize_options() | ||
tmpInitCatalog.run() | ||
|
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.
Variable names should be in snake_case
, not camelCase
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1142 +/- ##
=======================================
Coverage 91.28% 91.28%
=======================================
Files 27 27
Lines 4623 4624 +1
=======================================
+ Hits 4220 4221 +1
Misses 403 403
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Aarni Koskela <[email protected]>
The original logic replaced in Will it be better to elevate the logic of |
Replaced the redundant init logic in
UpdateCatalog.run()
with a temporaryInitCatalog
instance to ensure the parent directory of the output file will be created. (close #1139)