diff options
author | mia <mia@mia.jetzt> | 2024-09-04 04:47:13 -0700 |
---|---|---|
committer | mia <mia@mia.jetzt> | 2024-09-04 04:47:13 -0700 |
commit | bb8a48fd4d85ba4f8224c68aaaf9069d5d79dae2 (patch) | |
tree | bdb0654c667f37c69addc9efd1e29b9cfe710c51 /1_graph.py | |
parent | 81071e8feefdf815e29318226c668664e1706da2 (diff) | |
download | scrubber-bb8a48fd4d85ba4f8224c68aaaf9069d5d79dae2.tar.gz scrubber-bb8a48fd4d85ba4f8224c68aaaf9069d5d79dae2.zip |
desktop changes
Diffstat (limited to '1_graph.py')
-rw-r--r-- | 1_graph.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/1_graph.py b/1_graph.py index bc8116c..824d723 100644 --- a/1_graph.py +++ b/1_graph.py @@ -3,24 +3,20 @@ import sys from collections import namedtuple from functools import cache from pathlib import Path +from typing import Optional import psycopg -try: - import progressbar2 as progressbar -except ImportError: - import progressbar +from com import eval_config, progressbar Note = namedtuple("Note", ["renote_id", "reply_id", "user_id"]) Tree = namedtuple("Tree", ["id", "replies", "renotes"]) -print("configuring") -config = {} -exec(Path("config.py").read_text(), config) +config = eval_config() conn: psycopg.Connection = config["connect"]() user_id: str = config["user_id"] -early_exit = config.get("early_exit") +early_exit: Optional[int] = config.get("early_exit") print("fetching note ids", file=sys.stderr) |