Skip to content

Commit

Permalink
mypy cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jvansanten committed May 30, 2024
1 parent cbcb4ab commit 1ac1482
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ampel/nuclear/t3/T3PlotNeoWISE.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def process(

plot_fname = f"{filebase}-neoWISE.pdf"
buf = io.BytesIO()
ax.figure.savefig(buf, format="pdf")
fig.savefig(buf, format="pdf")
buf.seek(0)
self.put(plot_fname, buf.read())
self.logger.debug(f"plotting {tran_name}")
Expand Down
6 changes: 3 additions & 3 deletions ampel/nuclear/t3/dropboxIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ def put(self, path, payload):

def maybe_commit(self) -> None:
if sum(size for _, _, size in self._payloads) >= self.buffer_size_mb * (1<<20):
return self.commit()
self.commit()

@backoff.on_predicate(backoff.expo, factor=10, max_tries=5)
def commit(self) -> bool:
def commit(self) -> None:

# Dropbox cannot handle queues containing more than 1000 files
payload_subsets = [
Expand Down Expand Up @@ -228,7 +228,7 @@ def commit(self) -> bool:
if result.is_failure():
self._payloads.append(item)
self.logger.error(f"{result.get_failure()} for {item[1]}")
return len(self._payloads) == 0
return

@lru_cache(maxsize=1024)
@handle_disconnects
Expand Down

0 comments on commit 1ac1482

Please sign in to comment.