Skip to content

Commit

Permalink
Removed unused improts and variables using autoflake (Fixes #82)
Browse files Browse the repository at this point in the history
  • Loading branch information
prologic committed Jun 1, 2015
1 parent 65bb0c9 commit 5a9d41e
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 14 deletions.
4 changes: 1 addition & 3 deletions circuits/io/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
This module implements basic Serial (RS232) I/O.
"""

import os
import select
from collections import deque

from circuits.core import Component, handler, Event
from circuits.core.pollers import BasePoller, Poller
from circuits.core.utils import findcmp
from circuits.tools import tryimport
from circuits.six import binary_type, string_types
from circuits.six import binary_type

from .events import closed, error, opened, read, ready, close

Expand Down
1 change: 0 additions & 1 deletion circuits/web/dispatchers/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from circuits.web.utils import parse_qs
from circuits.web.events import response
from circuits.web.errors import httperror
from circuits.web.processors import process
from circuits.web.controllers import BaseController

Expand Down
1 change: 0 additions & 1 deletion circuits/web/loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import sys
import datetime
from io import IOBase
from email._parseaddr import _monthnames

from circuits.six import string_types, text_type
from circuits.core import handler, BaseComponent
Expand Down
3 changes: 1 addition & 2 deletions circuits/web/parsers/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
from tempfile import TemporaryFile
from wsgiref.headers import Headers
import re
import sys
try:
from urlparse import parse_qs
except ImportError: # pragma: no cover (fallback for Python 2.5)
Expand Down Expand Up @@ -363,7 +362,7 @@ def finish_header(self):
self.headers = Headers(self.headerlist)
cdis = self.headers.get('Content-Disposition', '')
ctype = self.headers.get('Content-Type', '')
clen = self.headers.get('Content-Length', '-1')
self.headers.get('Content-Length', '-1')
if not cdis:
raise MultipartError('Content-Disposition header is missing.')
self.disposition, self.options = parse_options_header(cdis)
Expand Down
2 changes: 0 additions & 2 deletions circuits/web/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from math import sqrt
from io import TextIOWrapper
from cgi import FieldStorage
from collections import MutableMapping

try:
from urllib.parse import urljoin as _urljoin
Expand All @@ -22,7 +21,6 @@
except ImportError:
from cgi import parse_qs as _parse_qs # NOQA

from circuits.six import iterbytes
from circuits.net.utils import is_ssl_handshake # backwards compatibility

from .exceptions import RangeUnsatisfiable, RequestEntityTooLarge
Expand Down
3 changes: 2 additions & 1 deletion examples/node/increment/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from optparse import OptionParser

from circuits.node import Node, remote, protocol
from circuits.node import Node
from circuits.node import remote
from circuits import Component, Debugger, Event


Expand Down
5 changes: 3 additions & 2 deletions examples/node/send_all_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

from optparse import OptionParser

from circuits.node import Node, remote, protocol
from circuits import Component, Debugger, Event
from circuits.node import Node
from circuits import Component
from circuits import Debugger

This comment has been minimized.

Copy link
@spaceone

spaceone Jun 1, 2015

Contributor

...

This comment has been minimized.

Copy link
@prologic

prologic Jun 1, 2015

Author Member

Hmm?

This comment has been minimized.

Copy link
@spaceone

spaceone Jun 1, 2015

Contributor

the last lines can be merged to one line

This comment has been minimized.

Copy link
@prologic

prologic Jun 1, 2015

Author Member

Ahh yeah good point I'll fix that :)



__version__ = "0.0.1"
Expand Down
4 changes: 2 additions & 2 deletions tests/web/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_notfound(webapp):

def test_contenttype(webapp):
try:
f = urlopen("%s/test_contenttype" % webapp.server.http.base)
urlopen("%s/test_contenttype" % webapp.server.http.base)
except HTTPError as e:
assert e.code == 500
assert e.msg == "Internal Server Error"
Expand All @@ -73,7 +73,7 @@ def test_contenttype(webapp):

def test_contenttype_json(webapp):
try:
f = urlopen("%s/test_contenttype_json" % webapp.server.http.base)
urlopen("%s/test_contenttype_json" % webapp.server.http.base)
except HTTPError as e:
assert "json" in e.headers.get("Content-Type")
result = json.loads(e.read().decode("utf-8"))
Expand Down

0 comments on commit 5a9d41e

Please sign in to comment.