Update scalafmt to 2.5.1 + scalafmtAll

This commit is contained in:
Eike Kettner
2020-05-04 23:52:53 +02:00
parent 169510aec1
commit c41cdeefec
65 changed files with 523 additions and 431 deletions

View File

@ -60,7 +60,7 @@ object Extraction {
ImageSize.get(data).flatMap {
case Some(dim) =>
if (dim.product > cfg.ocr.maxImageSize) {
if (dim.product > cfg.ocr.maxImageSize)
logger.info(
s"Image size (${dim.product}) is too large (max ${cfg.ocr.maxImageSize})."
) *>
@ -71,9 +71,8 @@ object Extraction {
)
)
.pure[F]
} else {
else
doExtract
}
case None =>
logger.info(
s"Cannot read image data from ${mt.asString}. Extracting anyways."

View File

@ -33,8 +33,9 @@ object PdfExtract {
//maybe better: inspect the pdf and decide whether ocr or not
for {
pdfboxRes <- logger.debug("Trying to strip text from pdf using pdfbox.") *> PdfboxExtract
.get[F](in)
pdfboxRes <-
logger.debug("Trying to strip text from pdf using pdfbox.") *> PdfboxExtract
.get[F](in)
res <- pdfboxRes.fold(
ex =>
logger.info(
@ -44,7 +45,9 @@ object PdfExtract {
if (str.length >= stripMinLen) str.pure[F].attempt
else
logger
.info(s"Stripped text from PDF is small (${str.length}). Trying with OCR.") *>
.info(
s"Stripped text from PDF is small (${str.length}). Trying with OCR."
) *>
runOcr.flatMap(ocrStr => chooseResult(ocrStr, str)).attempt
)
} yield res