Format code

This commit is contained in:
Marty Oehme 2023-08-28 12:55:01 +02:00
parent 1bb1b80620
commit ff84a28c4a
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 4 additions and 5 deletions

View file

@ -21,9 +21,9 @@ DEFAULT_OPTIONS = {
"plugins.extract": {
"tags": {"important": "red", "toread": "blue"},
"on_import": False,
"minimum_similarity": 0.75, # for checking against existing annotations
"minimum_similarity_content": 0.9, # for checking if highlight or note
"minimum_similarity_color": 0.833 # for matching tag to color
"minimum_similarity": 0.75, # for checking against existing annotations
"minimum_similarity_content": 0.9, # for checking if highlight or note
"minimum_similarity_color": 0.833, # for matching tag to color
}
}
papis.config.register_default_settings(DEFAULT_OPTIONS)

View file

@ -71,8 +71,7 @@ class Annotation:
)
nearest = None
minimum_similarity = (
papis.config.getfloat("minimum_similarity_color", "plugins.extract")
or 1.0
papis.config.getfloat("minimum_similarity_color", "plugins.extract") or 1.0
)
for name, values in COLORS.items():
similarity_ratio = self._color_similarity_ratio(values, annot_colors)