From 0ac8d8e9ac893e2d9f1915d0d7df081f3d87fed7 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 18 Oct 2016 02:28:24 +0000 Subject: [PATCH] flake8 --- devel-server.py | 3 ++- mistune.py | 2 +- puzzles.py | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/devel-server.py b/devel-server.py index 785bb3e..b1d0a3b 100755 --- a/devel-server.py +++ b/devel-server.py @@ -15,6 +15,7 @@ except ImportError: NOT_FOUND = 404 OK = 200 + def page(title, body): return """ @@ -120,7 +121,7 @@ you are a fool. self.serve_md() else: super().do_GET() - + def serve_md(self, text=None): fspathstr = self.translate_path(self.path) fspath = pathlib.Path(fspathstr) diff --git a/mistune.py b/mistune.py index c0f976d..a81c4c1 100644 --- a/mistune.py +++ b/mistune.py @@ -335,7 +335,7 @@ class BlockLexer(object): rest = len(item) if i != length - 1 and rest: - _next = item[rest-1] == '\n' + _next = item[rest - 1] == '\n' if not loose: loose = _next diff --git a/puzzles.py b/puzzles.py index 5b057d6..652b655 100644 --- a/puzzles.py +++ b/puzzles.py @@ -23,6 +23,7 @@ def djb2hash(buf): # to be done with Puzzle's random number generator, and it's cleaner to not pass that around. PuzzleFile = namedtuple('PuzzleFile', ['path', 'handle', 'name', 'visible']) + class Puzzle: KNOWN_KEYS = [ @@ -197,7 +198,6 @@ class Puzzle: return answer - def htmlify(self): return mistune.markdown(self.body) @@ -227,8 +227,8 @@ class Puzzle: 'summary': self['summary'], } return obj - -if __name__ == '__main__': + +if __name__ == '__main__': parser = argparse.ArgumentParser(description='Build a puzzle category') parser.add_argument('puzzledir', nargs='+', help='Directory of puzzle source') args = parser.parse_args() @@ -246,4 +246,3 @@ if __name__ == '__main__': for points in sorted(puzzles): puzzle = puzzles[points] print(puzzle.secrets()) -