Closed johan-bjareholt closed 5 years ago
Merging #76 into master will increase coverage by
0.01%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 95% 95.01% +0.01%
==========================================
Files 33 33
Lines 1540 1546 +6
Branches 233 233
==========================================
+ Hits 1463 1469 +6
Misses 46 46
Partials 31 31
Impacted Files | Coverage Δ | |
---|---|---|
aw_analysis/query2.py | 99.02% <100%> (+0.01%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3f6b4fe...df80655. Read the comment docs.
Merging #76 into master will increase coverage by
0.03%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 95% 95.03% +0.03%
==========================================
Files 33 33
Lines 1540 1551 +11
Branches 233 233
==========================================
+ Hits 1463 1474 +11
Misses 46 46
Partials 31 31
Impacted Files | Coverage Δ | |
---|---|---|
aw_analysis/query2.py | 99.04% <100%> (+0.03%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3f6b4fe...6ea0923. Read the comment docs.
I'm not comfortable with the parser internals, but have you considered options like these?: https://stackoverflow.com/questions/1885181/how-do-i-un-escape-a-backslash-escaped-string-in-python
@ErikBjare That's the opposite of what this PR achieves? This code doesn't un-escape, it makes it possible to escape. Doing \n on a string and get a newline is still the case even with this code.
Ah, fair enough. I don't see any tests for strings like "Hello \\"world\\"!"
though. Shouldn't there be?
We should add that just to be sure of future changes not breaking it, but that's safe currently as it only matches the first quote type with another one of the same type.
@johan-bjareholt Sorry, the first example I made wasn't what I really meant. Edited the comment.
I realized that there was multiple faults with the previous code after writing some more tests, should be better now.
Fixed yet another bug, I have now tested with creating buckets containing a ' with aw-fakedata and it works. Will also have to test with buckets containing a "
This + web-ui escaping should fix https://github.com/ActivityWatch/aw-webui/issues/133