Closed SGA-A closed 9 months ago
Status: Currently focusing on the admin file. Note that the some errors have already been addressed but as of the latest commit, has not been pushed onto the repo.
cogs/admin.py:24:0: C0115: Missing class docstring (missing-class-docstring)
cogs/admin.py:29:4: W0236: Method 'cog_check' was expected to be 'non-async', found it instead as 'async' (invalid-overridden-method)
cogs/admin.py:32:4: W0221: Number of parameters was 0 in 'Cog.interaction_check' and is now 2 in overriding 'Administrate.interaction_check' method (arguments-differ)
cogs/admin.py:32:4: W0236: Method 'interaction_check' was expected to be 'non-async', found it instead as 'async' (invalid-overridden-method)
cogs/admin.py:94:4: R0914: Too many local variables (21/15) (too-many-locals)
cogs/admin.py:98:46: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
cogs/admin.py:124:26: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal)
cogs/admin.py:154:31: R1734: Consider using [] instead of list() (use-list-literal)
cogs/admin.py:162:41: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
cogs/admin.py:177:4: R0913: Too many arguments (7/5) (too-many-arguments)
cogs/admin.py:177:4: R0914: Too many local variables (17/15) (too-many-locals)
cogs/admin.py:214:39: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
cogs/admin.py:243:39: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
cogs/admin.py:258:39: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
cogs/admin.py:306:30: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
cogs/admin.py:24:0: R0904: Too many public methods (26/20) (too-many-public-methods)
cogs/admin.py:15:0: C0411: third party import "from discord import Object" should be placed before "from cogs.economy import CURRENCY, determine_exponent" (wrong-import-order)
cogs/admin.py:16:0: C0411: third party import "from asqlite import Connection as asqlite_Connection" should be placed before "from cogs.economy import CURRENCY, determine_exponent" (wrong-import-order)
cogs/admin.py:17:0: C0411: third party import "from discord import app_commands" should be placed before "from cogs.economy import CURRENCY, determine_exponent" (wrong-import-order)
cogs/admin.py:19:0: C0411: standard import "import asyncio" should be placed before "from discord.ext import commands" (wrong-import-order)
cogs/admin.py:20:0: C0411: standard import "import io" should be placed before "from discord.ext import commands" (wrong-import-order)
cogs/admin.py:21:0: C0411: third party import "import discord" should be placed before "from cogs.economy import CURRENCY, determine_exponent" (wrong-import-order)
cogs/admin.py:15:0: C0412: Imports from package discord are not grouped (ungrouped-imports)
cogs/admin.py:17:0: C0412: Imports from package discord are not grouped (ungrouped-imports)
There are over 1000 recommendations that Pylint has suggested. We will be implementing these, but the time it will take will range from a few weeks to even months! This PR will be a draft while it all happens. In doing this, I've reached the highest amount of contributions ever in a single day, which is somewhat falsely interpreted in this case.
This PR will probably be on the highest priority over all other issues and PRs, as we aim to optimize our code for efficiency and readability. It seems odd to say this, but performance-wise we have already started seeing huge differences after applying these small changes. All other issues and PRs will be suspended from progression until we can first resolve these checks.
Also, due to some mismatching f strings errors that occur for Python versions <3.12, this bot is no longer viable with Python versions <3.12. Python 3.12 is now the only supported version, because of this change.
We will be updating the badges that are displayed on the repo's README. It is also very unlikely we will fix incompatibility issues with previous Python versions like this in the future.
All the source code has now been modified to match the rulesets provided by the linter. Doing a final review before marking as ready.
Looks fine to me.
This PR fixes checks that are failing on merge. The introduction of recent actions meant that we found a lot of the checks are failing. We are looking into each individual error and fixing them over time.