From 6587645f763a2c1d787371cf3f5c2d0a44a1df59 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 4 Jan 2007 18:04:43 -0700 Subject: [PATCH] fix pyflakes warnings in figleaf --- src/allmydata/util/figleaf.py | 10 +++++----- src/allmydata/util/figleaf_htmlizer.py | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/allmydata/util/figleaf.py b/src/allmydata/util/figleaf.py index 5a3b1fb3..38045ef4 100644 --- a/src/allmydata/util/figleaf.py +++ b/src/allmydata/util/figleaf.py @@ -60,12 +60,12 @@ import os import threading from cPickle import dump, load -# import builtin sets if in > 2.4, otherwise use 'sets' module. -if 'set' not in dir(__builtins__): - from sets import Set as set +### import builtin sets if in > 2.4, otherwise use 'sets' module. +# we require 2.4 or later +assert set -from token import * +from token import tok_name, NEWLINE, STRING, INDENT, DEDENT, COLON import parser, types, symbol def get_token_name(x): @@ -355,7 +355,7 @@ def get_info(): ############# def display_ast(): - l = figleaf._LineGrabber(open(sys.argv[1])) + l = LineGrabber(open(sys.argv[1])) l.pretty_print() def main(): diff --git a/src/allmydata/util/figleaf_htmlizer.py b/src/allmydata/util/figleaf_htmlizer.py index 919fbbe9..3e0c263c 100644 --- a/src/allmydata/util/figleaf_htmlizer.py +++ b/src/allmydata/util/figleaf_htmlizer.py @@ -1,7 +1,6 @@ #! /usr/bin/env python import sys import figleaf -from cPickle import load import os import re -- 2.45.2