From 4116bc82ff3fd957c6cf21b075d6544fd243e4a5 Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Mon, 26 Sep 2022 13:58:47 -0500 Subject: [PATCH] Fix request prioritization bug --- strikebot/setup.cfg | 2 +- strikebot/src/strikebot/__init__.py | 2 ++ strikebot/src/strikebot/reddit_api.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/strikebot/setup.cfg b/strikebot/setup.cfg index c22a71f..2165396 100644 --- a/strikebot/setup.cfg +++ b/strikebot/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = strikebot -version = 0.0.3 +version = 0.0.4 [options] package_dir = diff --git a/strikebot/src/strikebot/__init__.py b/strikebot/src/strikebot/__init__.py index d9e4302..abe6065 100644 --- a/strikebot/src/strikebot/__init__.py +++ b/strikebot/src/strikebot/__init__.py @@ -1,3 +1,5 @@ +"""Count tracking logic.""" + from contextlib import nullcontext as nullcontext from dataclasses import dataclass from functools import total_ordering diff --git a/strikebot/src/strikebot/reddit_api.py b/strikebot/src/strikebot/reddit_api.py index 3e69e6c..2059707 100644 --- a/strikebot/src/strikebot/reddit_api.py +++ b/strikebot/src/strikebot/reddit_api.py @@ -89,7 +89,7 @@ class DeleteRequest(_Request): } def _subtype_cmp_key(self): - return -self.update_ts + return -self.update_ts.timestamp() @dataclass(eq = False) -- 2.30.2