From 1e017ab4b7503ad5d8c8b40161ede483cf1ec07c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 16 Apr 2021 17:01:41 -0400 Subject: [PATCH] pylint cleanup - found an actual bug this time! --- Makefile | 2 +- sst.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9e6b9cf..27f0ad0 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ check: #pylint COMMON_PYLINT = --rcfile=/dev/null --reports=n \ --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \ --dummy-variables-rgx='^_' -PYLINTOPTS = $(COMMON_PYLINT) --disable=C0103,C0111,C0113,C1001,C0301,C0302,C0321,C0325,C0326,C0410,C1801,E1120,R0101,R0902,R0903,R0911,R0912,R0914,R0915,R0916,R1705,R1706,R1710,W0110,W0123,W0141,W0232,W0312,W0603,W0611 +PYLINTOPTS = $(COMMON_PYLINT) --disable=C0103,C0111,C0113,C1001,C0301,C0302,C0321,C0325,C0326,C0410,C1801,E1120,R0101,R0902,R0903,R0911,R0912,R0914,R0915,R0916,R1705,R1711,R1714,R1716,R1723,R1724,R1706,R1710,W0110,W0123,W0141,W0232,W0312,W0603,W0611 pylint: @pylint --output-format=parseable $(PYLINTOPTS) sst.py diff --git a/sst.py b/sst.py index aa91753..8edb61b 100755 --- a/sst.py +++ b/sst.py @@ -2859,7 +2859,7 @@ def supernova(w): for nq.i in range(GALSIZE): for nq.j in range(GALSIZE): nstars += game.state.galaxy[nq.i][nq.j].stars - if stars == 0: + if nstars == 0: return # nothing to supernova exists num = rnd.integer(nstars) + 1 for nq.i in range(GALSIZE): @@ -5359,7 +5359,6 @@ def sectscan(goodScan, i, j): 'T':LIGHTRED, '@':LIGHTGREEN, 'P':LIGHTGREEN, - '?':MAGENTA, }.get(game.quad[i][j], DEFAULT)) proutn("%c " % game.quad[i][j]) textcolor(DEFAULT) -- 2.31.1