Fix pybabel update --init-missing not creating parent directory#1142
Fix pybabel update --init-missing not creating parent directory#1142du33169 wants to merge 3 commits intopython-babel:masterfrom
pybabel update --init-missing not creating parent directory#1142Conversation
akx
left a comment
There was a problem hiding this comment.
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.
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 <akx@iki.fi>
The original logic replaced in Will it be better to elevate the logic of |
Replaced the redundant init logic in
UpdateCatalog.run()with a temporaryInitCataloginstance to ensure the parent directory of the output file will be created. (close #1139)