Closed voneiden closed 2 years ago
Merging #356 (826a7b1) into master (4b461fe) will increase coverage by
0.06%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #356 +/- ##
==========================================
+ Coverage 88.59% 88.65% +0.06%
==========================================
Files 19 19
Lines 1490 1499 +9
Branches 204 205 +1
==========================================
+ Hits 1320 1329 +9
Misses 137 137
Partials 33 33
Impacted Files | Coverage Δ | |
---|---|---|
cq_editor/widgets/editor.py | 96.27% <100.00%> (+0.22%) |
:arrow_up: |
:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more
Thanks @voneiden , should I merge?
@adam-urbanczyk OK to merge on my behalf. I made a minor modification just now: I moved the encode
outside of open
block just in case to avoid the originally described issue where the file is emptied if encoding fails. Now such unexpected failure will happen before opening the file, preserving the contents.
Great, thanks @voneiden !
There would also be the option to return
None
fromdetermine_encoding
and fallback to system default encoding but I'm not in favour of that. I support defaulting to UTF-8, as it's the de facto standard for editors. Even the classic notepad.exe switched from ANSI to UTF-8 default in Windows 10.Related issues: #351 and #276