Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

Commit

Permalink
Fix some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kxz committed Mar 26, 2016
1 parent 90dd7d1 commit bad09b5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
3 changes: 3 additions & 0 deletions omnipresence/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ def length_hint(obj, default=0):
if hint < 0:
raise ValueError("__length_hint__() should return >= 0")
return hint


__all__ = ['length_hint']
4 changes: 2 additions & 2 deletions omnipresence/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def _lineReceived(self, line):
# Twisted doesn't like it when `lineReceived` returns a value,
# but we need to do so for some unit tests.
deferred = self.respond_to(Message.from_raw(self, False, line))
super(ConnectionBase, self).lineReceived(line)
super(Connection, self).lineReceived(line)
return deferred

def lineReceived(self, line):
Expand All @@ -593,7 +593,7 @@ def sendLine(self, line):
"""Overrides `.IRCClient.sendLine`."""
deferred = self.respond_to(Message.from_raw(
self, True, line, actor=self.nickname))
super(ConnectionBase, self).sendLine(line)
super(Connection, self).sendLine(line)
return deferred


Expand Down
1 change: 0 additions & 1 deletion omnipresence/plugins/dice/test_dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from twisted.internet.defer import inlineCallbacks
from twisted.trial.unittest import TestCase

from ...hostmask import Hostmask
from ...message import Message, collapse
from ...test.helpers import CommandTestMixin

Expand Down
1 change: 0 additions & 1 deletion omnipresence/plugins/google/test_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from ...compat import length_hint
from ...message import collapse
from ...plugin import UserVisibleError
from ...test.helpers import CommandTestMixin

from . import Default
Expand Down
2 changes: 1 addition & 1 deletion omnipresence/plugins/more/test_more.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from twisted.trial.unittest import TestCase

from ...message import Message, ReplyBuffer, collapse
from ...message import ReplyBuffer
from ...settings import PRIVATE_CHANNEL
from ...test.helpers import CommandTestMixin, OutgoingPlugin

Expand Down
12 changes: 6 additions & 6 deletions omnipresence/plugins/url/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ExtractURLsTestCase(unittest.TestCase):
# Most test cases are adapted from Django's urlize tests.

def assert_urls(self, text, urls):
return list(extract_urls(text)) == urls
self.assertEqual(list(extract_urls(text)), urls)

def test_http(self):
self.assert_urls('http://example.com', ['http://example.com'])
Expand All @@ -33,11 +33,11 @@ def test_word_with_dot(self):

def test_parentheses(self):
self.assert_urls('http://example.com/a_(b)',
['http://example.com/a_(b)'])
['http://example.com/a_(b)'])
self.assert_urls('(http://example.com/a_(b))',
['http://example.com/a_(b)'])
['http://example.com/a_(b)'])
self.assert_urls('(see http://example.com/a_(b))',
['http://example.com/a_(b)'])
['http://example.com/a_(b)'])

def test_malformed(self):
self.assert_urls('http:///example.com', [])
Expand All @@ -49,14 +49,14 @@ def test_uppercase(self):

def test_trailing_period(self):
self.assert_urls('(Go to http://example.com/a.)',
['http://example.com/a'])
['http://example.com/a'])

def test_ipv4(self):
self.assert_urls('http://10.0.0.1/foo', ['http://10.0.0.1/foo'])

def test_ipv6(self):
self.assert_urls('http://[2001:db8:cafe::2]/foo',
['http://[2001:db8:cafe::2]/foo'])
['http://[2001:db8:cafe::2]/foo'])

def test_catastrophic_backtracking(self):
"""Test that we don't crash on URLs that cause catastrophic
Expand Down
1 change: 0 additions & 1 deletion omnipresence/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import yaml

from .connection import ConnectionFactory
from .settings import ConnectionSettings


def indent(string):
Expand Down

0 comments on commit bad09b5

Please sign in to comment.