lint: fix bare except and unused variables
This commit is contained in:
+6
-2
@@ -57,7 +57,9 @@ class StateStore:
|
||||
self.path.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp_path = self.path.with_suffix(self.path.suffix + ".tmp")
|
||||
with tmp_path.open("w", encoding="utf-8") as handle:
|
||||
json.dump(self._merge_defaults(state), handle, ensure_ascii=False, indent=2)
|
||||
json.dump(
|
||||
self._merge_defaults(state), handle, ensure_ascii=False, indent=2
|
||||
)
|
||||
handle.write("\n")
|
||||
tmp_path.replace(self.path)
|
||||
self._cache = None
|
||||
@@ -71,7 +73,9 @@ class StateStore:
|
||||
|
||||
def continuous_config(self) -> Dict[str, Any]:
|
||||
state = self.load()
|
||||
return dict(state.get("continuous_scraping") or DEFAULT_STATE["continuous_scraping"])
|
||||
return dict(
|
||||
state.get("continuous_scraping") or DEFAULT_STATE["continuous_scraping"]
|
||||
)
|
||||
|
||||
def save_continuous_config(self, config: Dict[str, Any]) -> Dict[str, Any]:
|
||||
def mutate(state: Dict[str, Any]) -> None:
|
||||
|
||||
Reference in New Issue
Block a user