From 16aeaa50db79e3c17194128a93d22370bf5daa33 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Tue, 19 Mar 2024 23:07:54 -0400 Subject: markov: avoid float division in uint_to_bytes It seems as though the float division could cause an issue where the actual value should be an integer but the float representation is slightly higher than that, causing the addition of an extra unnecessary byte. Although this works fine as long as the same function is used, it could cause problems if seemingly inconsequential details change. I switch to using divmod and checking for the presence of a remainder. This should ensure use of the exact minimum required number of bytes in the blob. --- simplestarboard/__init__.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 simplestarboard/__init__.py (limited to 'simplestarboard/__init__.py') diff --git a/simplestarboard/__init__.py b/simplestarboard/__init__.py deleted file mode 100644 index 26d4ba8..0000000 --- a/simplestarboard/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .starboard import SimpleStarboard - - -async def setup(bot): - await bot.add_cog(SimpleStarboard(bot)) -- cgit v1.2.3-57-g22cb