From: Brian Warner Date: Fri, 5 Jan 2007 01:04:43 +0000 (-0700) Subject: fix pyflakes warnings in figleaf X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~405 X-Git-Url: https://git.rkrishnan.org/vdrive//%22news.html/%22?a=commitdiff_plain;h=6587645f763a2c1d787371cf3f5c2d0a44a1df59;p=tahoe-lafs%2Ftahoe-lafs.git fix pyflakes warnings in figleaf --- 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