steamcmd / api

Read-only API interface for steamcmd app_info
https://www.steamcmd.net
MIT License
56 stars 7 forks source link

Activate (and fix) PyLint linting #9

Closed jonakoudijs closed 3 years ago

jonakoudijs commented 4 years ago

Currently pylint is disabled. Preferably this is enabled again, there is a list of small things that will need to be fixed when activating it. At time of writing pylint shows the following:

api on  master ❯ pylint src
************* Module run
src/run.py:231:0: C0330: Wrong hanging indentation before block (add 4 spaces).
        not len(parse_uri(env["PATH_INFO"])) >= 2
        ^   | (bad-continuation)
src/run.py:232:0: C0330: Wrong hanging indentation before block (add 4 spaces).
        or not parse_uri(env["PATH_INFO"])[0] in config.ALLOWED_VERSIONS
        ^   | (bad-continuation)
src/run.py:233:0: C0330: Wrong hanging indentation before block (add 4 spaces).
        or not parse_uri(env["PATH_INFO"])[1] in config.AVAILABLE_ENDPOINTS
        ^   | (bad-continuation)
src/run.py:309:0: C0330: Wrong continued indentation (add 8 spaces).
                    "could be found on Steam",
                    ^       | (bad-continuation)
src/run.py:333:0: C0301: Line too long (117/100) (line-too-long)
src/run.py:353:0: C0301: Line too long (124/100) (line-too-long)
src/run.py:8:0: E0401: Unable to import 'semver' (import-error)
src/run.py:10:0: E0401: Unable to import 'redis' (import-error)
src/run.py:275:15: W0703: Catching too general exception Exception (broad-except)
src/run.py:214:0: R0912: Too many branches (16/12) (too-many-branches)
src/run.py:214:0: R0915: Too many statements (58/50) (too-many-statements)
src/run.py:10:0: W0611: Unused import redis (unused-import)
src/run.py:9:0: C0411: standard import "import json" should be placed before "import semver" (wrong-import-order)
src/run.py:11:0: C0411: standard import "import os" should be placed before "import semver" (wrong-import-order)
************* Module vdf
src/vdf.py:34:4: W0702: No exception type(s) specified (bare-except)
src/vdf.py:37:8: W0702: No exception type(s) specified (bare-except)
src/vdf.py:44:0: R0914: Too many local variables (16/15) (too-many-locals)
src/vdf.py:117:15: C0113: Consider changing "not nextkey in ['{', '}']" to "nextkey not in ['{', '}']" (unneeded-not)
src/vdf.py:131:11: W0703: Catching too general exception Exception (broad-except)
src/vdf.py:51:4: W0612: Unused variable 'parent' (unused-variable)
src/vdf.py:52:4: W0612: Unused variable 'depth' (unused-variable)
src/vdf.py:147:0: R0912: Too many branches (30/12) (too-many-branches)
src/vdf.py:147:0: R0915: Too many statements (66/50) (too-many-statements)

------------------------------------------------------------------
Your code has been rated at 8.72/10 (previous run: 8.72/10, +0.00)
jonakoudijs commented 4 years ago

Currently the API is being rewritten with FastAPI: https://github.com/steamcmd/api/issues/11 so it's probably better to look at the pylint results after this is done.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.