remove analyze() from PlaceInfo class

The function creates circular dependencies.
This commit is contained in:
Sarah Hoffmann
2022-07-06 11:33:07 +02:00
parent cbbcbb1fd7
commit 856925d19b
3 changed files with 8 additions and 12 deletions

View File

@@ -9,8 +9,6 @@ Wrapper around place information the indexer gets from the database and hands to
the tokenizer.
"""
import psycopg2.extras
class PlaceInfo:
""" Data class containing all information the tokenizer gets about a
place it should process the names for.
@@ -20,13 +18,6 @@ class PlaceInfo:
self._info = info
def analyze(self, analyzer):
""" Process this place with the given tokenizer and return the
result in psycopg2-compatible Json.
"""
return psycopg2.extras.Json(analyzer.process_place(self))
@property
def name(self):
""" A dictionary with the names of the place or None if the place