From 01a19174664a126d51a05c1d526f3c987cb951ca Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 25 Apr 2019 17:54:35 -0400 Subject: [PATCH] pylint cleanup. --- Makefile | 2 +- control | 2 +- sst.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c1d6685..9e6b9cf 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,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,R1706,R1710,W0110,W0123,W0141,W0232,W0312,W0603,W0611 pylint: @pylint --output-format=parseable $(PYLINTOPTS) sst.py diff --git a/control b/control index 84813e2..3311e7f 100644 --- a/control +++ b/control @@ -47,4 +47,4 @@ XBS-Logo: trek.png XBS-VC-Tag-Template: %(version)s -XBS-Validate: make check +XBS-Validate: make pylint check diff --git a/sst.py b/sst.py index 2420222..20f67b0 100755 --- a/sst.py +++ b/sst.py @@ -44,7 +44,7 @@ def _(st): class randomizer: # LCG PRNG parameters tested against - # Knuth vol. 2. by the authors of ADVENT + # Knuth vol. 2. by the authors of ADVENT LCG_A = 1093 LCG_C = 221587 LCG_M = 1048576 @@ -53,7 +53,7 @@ class randomizer: def random(): old_x = game.lcg_x game.lcg_x = (randomizer.LCG_A * game.lcg_x + randomizer.LCG_C) % randomizer.LCG_M - return old_x / randomizer.LCG_M; + return old_x / randomizer.LCG_M @staticmethod def withprob(p): @@ -196,8 +196,8 @@ class Coord: return self.roundtogrid() % QUADSIZE def scatter(self): s = Coord() - s.i = self.i + rnd.range(-1, 2) - s.j = self.j + rnd.range(-1, 2) + s.i = self.i + rnd.integer(-1, 2) + s.j = self.j + rnd.integer(-1, 2) return s def __str__(self): if self.i is None or self.j is None: -- 2.31.1