pylint cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 25 Apr 2019 21:54:35 +0000 (17:54 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 25 Apr 2019 21:54:35 +0000 (17:54 -0400)
Makefile
control
sst.py

index c1d66853f318db52f2472e294dc14f72a20e7723..9e6b9cf5885bc2254498e2f506e9eb0aeb7b8a2b 100644 (file)
--- 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 84813e2164f8f96de2ad4ad4c1859fbfa43e15d2..3311e7fc82d9abfc5b0d864dd238102d780a567f 100644 (file)
--- 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 242022296e03d3d7835693ebd498a0eebb75845f..20f67b0f6e3736d8003b781fc3fad69b219c71b9 100755 (executable)
--- 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: