mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-05 11:38:20 +00:00
chore: enable trailing-whitespace and cleanup (#3847)
* enable trailing-whitespace * remove trailing whitespace on rest api too
This commit is contained in:
parent
fa4404baa0
commit
4cbc8550d6
@ -1,50 +1,50 @@
|
||||
FLOWERS = r"""
|
||||
|
||||
vVVVv vVVVv
|
||||
|
||||
vVVVv vVVVv
|
||||
(___) vVVVv (___) vVVVv
|
||||
~Y~ (___) ~Y~ (___)
|
||||
\| \~Y~/ \| \~Y~/
|
||||
\\|// \\|// \\|// \\|//
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
"""
|
||||
|
||||
SAMPLE = r"""
|
||||
.--. _____ _
|
||||
.'_\/_'. / ____| | |
|
||||
'. /\ .' | (___ __ _ _ __ ___ _ __ | | ___
|
||||
"||" \___ \ / _` | '_ ` _ \| '_ \| |/ _ \
|
||||
.--. _____ _
|
||||
.'_\/_'. / ____| | |
|
||||
'. /\ .' | (___ __ _ _ __ ___ _ __ | | ___
|
||||
"||" \___ \ / _` | '_ ` _ \| '_ \| |/ _ \
|
||||
|| /\ ____) | (_| | | | | | | |_) | | __/
|
||||
/\ ||//\) |_____/ \__,_|_| |_| |_| .__/|_|\___|
|
||||
(/\\||/ |_|
|
||||
______\||/___________________________________________
|
||||
(/\\||/ |_|
|
||||
______\||/___________________________________________
|
||||
"""
|
||||
|
||||
FENCE = r"""
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_
|
||||
-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_
|
||||
-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-
|
||||
|_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_|
|
||||
|_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_|
|
||||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
|
||||
"""
|
||||
|
||||
TRACTOR_SMALL = r"""
|
||||
TRACTOR_SMALL = r"""
|
||||
______
|
||||
|o | !
|
||||
__ |:`_|---'-.
|
||||
|__|______.-/ _ \-----.|
|
||||
(o)(o)------'\ _ / ( )
|
||||
|__|______.-/ _ \-----.|
|
||||
(o)(o)------'\ _ / ( )
|
||||
"""
|
||||
|
||||
|
||||
TRACTOR_WITH_SILO_LINE = r"""
|
||||
TRACTOR_WITH_SILO_LINE = r"""
|
||||
____
|
||||
/____\
|
||||
______ | |
|
||||
|o | ! | |
|
||||
|o | ! | |
|
||||
__ |:`_|---'-. | |
|
||||
|__|______.-/ _ \-----.| |______|
|
||||
(o)(o)------'\ _ / ( ) | |
|
||||
@ -81,23 +81,23 @@ BUSH_SEP = r"""\\|// \\|// \\|// \\|// \\|//
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"""
|
||||
|
||||
WATERING_CAN = r"""
|
||||
______
|
||||
_ ,',----.`.
|
||||
'.`-. .-' '----. ||
|
||||
`.`-'--------| ;;
|
||||
`.|--------|//
|
||||
\ /
|
||||
'--------'
|
||||
______
|
||||
_ ,',----.`.
|
||||
'.`-. .-' '----. ||
|
||||
`.`-'--------| ;;
|
||||
`.|--------|//
|
||||
\ /
|
||||
'--------'
|
||||
"""
|
||||
|
||||
WORKER_M = r""" 0
|
||||
/|\
|
||||
WORKER_M = r""" 0 # pylint: disable=trailing-whitespace
|
||||
/|\
|
||||
/'\ """
|
||||
|
||||
WORKER_F = r""" 0
|
||||
/w\
|
||||
WORKER_F = r""" 0 # pylint: disable=trailing-whitespace
|
||||
/w\
|
||||
/ \ """
|
||||
|
||||
WORKER_X = r""" 0
|
||||
/w\
|
||||
WORKER_X = r""" 0 # pylint: disable=trailing-whitespace
|
||||
/w\
|
||||
/'\ """
|
||||
|
||||
@ -53,13 +53,13 @@ class ImageToTextConverter(BaseConverter):
|
||||
if verify_installation.returncode == 127:
|
||||
raise Exception(
|
||||
"""tesseract is not installed.
|
||||
|
||||
|
||||
Installation on Linux:
|
||||
apt-get install tesseract-ocr libtesseract-dev poppler-utils
|
||||
|
||||
|
||||
Installation on MacOS:
|
||||
brew install tesseract
|
||||
|
||||
|
||||
For installing specific language packs check here: https://tesseract-ocr.github.io/tessdoc/Installation.html
|
||||
"""
|
||||
)
|
||||
|
||||
@ -58,14 +58,14 @@ class PDFToTextConverter(BaseConverter):
|
||||
except FileNotFoundError:
|
||||
raise FileNotFoundError(
|
||||
"""pdftotext is not installed. It is part of xpdf or poppler-utils software suite.
|
||||
|
||||
|
||||
Installation on Linux:
|
||||
wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.04.tar.gz &&
|
||||
tar -xvf xpdf-tools-linux-4.04.tar.gz && sudo cp xpdf-tools-linux-4.04/bin64/pdftotext /usr/local/bin
|
||||
|
||||
|
||||
Installation on MacOS:
|
||||
brew install xpdf
|
||||
|
||||
|
||||
You can find more details here: https://www.xpdfreader.com
|
||||
"""
|
||||
)
|
||||
|
||||
@ -277,7 +277,6 @@ disable = [
|
||||
"f-string-without-interpolation",
|
||||
"abstract-method",
|
||||
"too-many-branches",
|
||||
"trailing-whitespace",
|
||||
"unspecified-encoding",
|
||||
"unidiomatic-typecheck",
|
||||
"no-name-in-module",
|
||||
|
||||
@ -16,10 +16,8 @@ pipelines = get_pipelines() # Unused here, called to init the pipelines early
|
||||
|
||||
logger.info("Open http://127.0.0.1:8000/docs to see Swagger API Documentation.")
|
||||
logger.info(
|
||||
"""
|
||||
Or just try it out directly: curl --request POST --url 'http://127.0.0.1:8000/query'
|
||||
-H "Content-Type: application/json" --data '{"query": "Who is the father of Arya Stark?"}'
|
||||
"""
|
||||
"Or just try it out directly: curl --request POST --url 'http://127.0.0.1:8000/query' "
|
||||
'-H "Content-Type: application/json" --data \'{"query": "Who is the father of Arya Stark?"}\''
|
||||
)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user