Closed joanise closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.42%. Comparing base (
f50768e
) to head (68f89e0
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
CLI load time: 0:00.05
PR head 68f89e01fa10509f0eafb1dc67679ea55b440c43
Imports that take more than 0.1 s:
import time: self [us] | cumulative | imported package
Looks like an easy win - you could even do
lines = open(input_text, encoding="utf8")
instead of reading all the lines at once, although then you have to close the file, so it's probably not worth it.
Yeah, I wanted my context manager to close the file in all exceptional cases, and I didn't want to have to wrap the whole rest of the function in a try/finally block, so I decided for this solution. We can review it if someone complains about memory at some point...
significant speed up when using it to process long files.
Fixes: #350