Remove unneeded variable
This commit is contained in:
@ -19,22 +19,6 @@ default_custom_embed: dict[str, str] = {
|
||||
}
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_db_location(custom_location: str = "") -> str:
|
||||
"""Where we store the database file.
|
||||
|
||||
Args:
|
||||
custom_location: Where the database file should be stored. This should be with the file name.
|
||||
|
||||
Returns:
|
||||
The database location.
|
||||
"""
|
||||
# Use the custom location if it is provided.
|
||||
db_loc: str = custom_location or os.path.join(data_dir, "db.sqlite")
|
||||
|
||||
return db_loc
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_reader(custom_location: str = "") -> Reader:
|
||||
"""Get the reader.
|
||||
@ -44,7 +28,7 @@ def get_reader(custom_location: str = "") -> Reader:
|
||||
|
||||
"""
|
||||
|
||||
db_location: str = get_db_location(custom_location)
|
||||
db_location: str = custom_location or os.path.join(data_dir, "db.sqlite")
|
||||
|
||||
return make_reader(url=db_location)
|
||||
|
||||
@ -64,7 +48,6 @@ def list_webhooks(reader: Reader) -> list[dict[str, str]]:
|
||||
# Get global tags
|
||||
if reader.get_tags(()) is not None:
|
||||
for tag in reader.get_tag_keys(()):
|
||||
# Check if the tag is named webhooks
|
||||
if tag == "webhooks":
|
||||
webhooks = reader.get_tag((), "webhooks") # type: ignore
|
||||
|
||||
|
Reference in New Issue
Block a user