Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

"redefinition of unused" error are no longer over-reported by pyflakes.

  • Loading branch information
wsanchez committed Dec 14, 2013
1 parent e7bc523 commit 76581a65b933590f0bd5df1e67bcaa6b46c9a19f
Showing with 11 additions and 8 deletions.
  1. +3 −2 contrib/performance/loadtest/sim.py
  2. +8 −5 contrib/performance/stats.py
  3. +0 −1 pyflakes
@@ -43,6 +43,8 @@
from twisted.internet.defer import inlineCallbacks
from twisted.internet.protocol import ProcessProtocol

from twisted.web.server import Site

from contrib.performance.loadtest.ical import OS_X_10_6
from contrib.performance.loadtest.profiles import Eventer, Inviter, Accepter
from contrib.performance.loadtest.population import (
@@ -214,7 +216,6 @@ def postOptions(self):
Arrival = namedtuple('Arrival', 'factory parameters')


from twisted.web import server

class LoadSimulator(object):
"""
@@ -461,7 +462,7 @@ def run(self, output=stdout):
if self.runtime is not None:
self.reactor.callLater(self.runtime, self.stopAndReport)
if self.webadminPort:
self.reactor.listenTCP(self.webadminPort, server.Site(LoadSimAdminResource(self)))
self.reactor.listenTCP(self.webadminPort, Site(LoadSimAdminResource(self)))
self.reactor.run()


@@ -15,16 +15,19 @@
##

from __future__ import print_function

from math import log, sqrt
from time import mktime
import random
import sqlparse

from pycalendar.datetime import DateTime
from pycalendar.duration import Duration as PyDuration
from pycalendar.icalendar.property import Property
from pycalendar.timezone import Timezone
from twisted.python.util import FancyEqMixin

from zope.interface import Interface, implements
import random
import time
import sqlparse
from twisted.python.util import FancyEqMixin


NANO = 1000000000.0
@@ -394,7 +397,7 @@ def __init__(self, daysOfWeek=["mon", "tue", "wed", "thu", "fri"], beginHour=8,


def astimestamp(self, dt):
return time.mktime(dt.timetuple())
return mktime(dt.timetuple())


def _findWorkAfter(self, when):
@@ -21,7 +21,6 @@ tmp="$(mktemp "/tmp/pyflakes.XXXXX")";

cd "${wd}" && "${pyflakes}" "$@" | sed \
-e "/'from ctypes import \\*' used; unable to detect undefined names/d" \
-e "/redefinition of unused/d" \
-e "/xmlext.py:[0-9][0-9]*: /d" \
| tee "${tmp}";

0 comments on commit 76581a6

Please sign in to comment.
You can’t perform that action at this time.