chore: Fix black fmt
This commit is contained in:
parent
aeb18ae358
commit
5a99665d7e
3 changed files with 6 additions and 7 deletions
|
@ -8,10 +8,7 @@ import papis.strings
|
|||
from papis.document import Document
|
||||
|
||||
from papis_extract import extractor, exporter
|
||||
from papis_extract.formatter import (
|
||||
Formatter,
|
||||
formatters
|
||||
)
|
||||
from papis_extract.formatter import Formatter, formatters
|
||||
|
||||
logger = papis.logging.get_logger(__name__)
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ def _add_annots_to_note(
|
|||
:type formatted_annotations: list[str]
|
||||
:param git: Flag indicating whether to commit changes to git, defaults to False.
|
||||
:type git: bool, optional
|
||||
:param force: Flag indicating whether to force adding annotations even if they
|
||||
:param force: Flag indicating whether to force adding annotations even if they
|
||||
already exist, defaults to False.
|
||||
:type force: bool, optional
|
||||
"""
|
||||
|
|
|
@ -26,13 +26,14 @@ def test_formatting_replacements(fmt_string, expected):
|
|||
|
||||
assert sut.format(fmt_string) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"fmt_string,expected",
|
||||
[
|
||||
("{{doc.title}}", "document-title"),
|
||||
("{{doc.title}}-{{doc.author}}", "document-title-document-author"),
|
||||
("{{quote}} ({{doc.author}})", "I am the text value (document-author)"),
|
||||
]
|
||||
],
|
||||
)
|
||||
def test_formatting_document_access(fmt_string, expected):
|
||||
sut = Annotation(
|
||||
|
@ -40,10 +41,11 @@ def test_formatting_document_access(fmt_string, expected):
|
|||
text="I am the text value",
|
||||
content="Whereas I represent the note",
|
||||
)
|
||||
doc = Document(data= {"title": "document-title", "author": "document-author"})
|
||||
doc = Document(data={"title": "document-title", "author": "document-author"})
|
||||
|
||||
assert sut.format(fmt_string, doc=doc) == expected
|
||||
|
||||
|
||||
def test_colorname_matches_exact():
|
||||
sut = Annotation("testfile", colors=(1.0, 0.0, 0.0), minimum_similarity_color=1.0)
|
||||
c_name = sut.colorname
|
||||
|
|
Loading…
Reference in a new issue