various lint failures
This commit is contained in:
parent
d508f6a5ad
commit
0d06116535
|
@ -8,17 +8,7 @@ from itertools import count
|
|||
|
||||
from zope.interface import implementer
|
||||
from twisted.python.reflect import requireModule
|
||||
|
||||
cryptography = requireModule("cryptography")
|
||||
|
||||
from twisted.conch.error import ConchError
|
||||
if cryptography:
|
||||
from twisted.conch.avatar import ConchUser
|
||||
from twisted.conch.ssh.session import ISession, SSHSession, wrapProtocol
|
||||
else:
|
||||
from twisted.conch.interfaces import ISession
|
||||
class ConchUser: pass
|
||||
|
||||
from twisted.cred import portal
|
||||
from twisted.internet import reactor, defer, protocol
|
||||
from twisted.internet.error import ProcessExitedAlready
|
||||
|
@ -27,14 +17,6 @@ from twisted.internet.utils import getProcessValue
|
|||
from twisted.python import filepath, log, runtime
|
||||
from twisted.python.compat import unicode, _PYPY
|
||||
from twisted.trial import unittest
|
||||
|
||||
try:
|
||||
from twisted.conch.scripts.conch import SSHSession as StdioInteractingSession
|
||||
except ImportError as e:
|
||||
StdioInteractingSession = None
|
||||
_reason = str(e)
|
||||
del e
|
||||
|
||||
from twisted.conch.test.test_ssh import ConchTestRealm
|
||||
from twisted.python.procutils import which
|
||||
|
||||
|
@ -47,15 +29,30 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import cryptography
|
||||
except ImportError:
|
||||
cryptography = None
|
||||
try:
|
||||
import pyasn1
|
||||
except ImportError:
|
||||
pyasn1 = None
|
||||
|
||||
cryptography = requireModule("cryptography")
|
||||
if cryptography:
|
||||
from twisted.conch.avatar import ConchUser
|
||||
from twisted.conch.ssh.session import ISession, SSHSession, wrapProtocol
|
||||
else:
|
||||
from twisted.conch.interfaces import ISession
|
||||
|
||||
class ConchUser:
|
||||
pass
|
||||
try:
|
||||
from twisted.conch.scripts.conch import (
|
||||
SSHSession as StdioInteractingSession
|
||||
)
|
||||
except ImportError as e:
|
||||
StdioInteractingSession = None
|
||||
_reason = str(e)
|
||||
del e
|
||||
|
||||
|
||||
|
||||
def _has_ipv6():
|
||||
""" Returns True if the system can bind an IPv6 address."""
|
||||
|
|
|
@ -132,8 +132,7 @@ class SaveLoadTests(TestCase):
|
|||
)
|
||||
|
||||
if _PYPY and _PY3:
|
||||
test_saveBytes.skip = "https://bitbucket.org/pypy/pypy/issues/3052/json-skipkeys-true-results-in-invalid-json"
|
||||
|
||||
test_saveBytes.skip = "https://bitbucket.org/pypy/pypy/issues/3052/"
|
||||
|
||||
|
||||
def test_saveUnPersistableThenFormat(self):
|
||||
|
|
|
@ -851,6 +851,7 @@ def _get_async_param(isAsync=None, **kwargs):
|
|||
return bool(isAsync)
|
||||
|
||||
|
||||
|
||||
def _pypy3BlockingHack():
|
||||
"""
|
||||
Work around U{this pypy bug
|
||||
|
@ -860,6 +861,7 @@ def _pypy3BlockingHack():
|
|||
from fcntl import fcntl, F_GETFL, F_SETFL
|
||||
if not (_PY3 and _PYPY):
|
||||
return
|
||||
|
||||
def fromFDWithoutModifyingFlags(fd, family, type, proto=None):
|
||||
passproto = [proto] * (proto is not None)
|
||||
flags = fcntl(fd, F_GETFL)
|
||||
|
|
|
@ -23,7 +23,9 @@ of course.
|
|||
|
||||
from __future__ import division, absolute_import
|
||||
|
||||
import gc, sys, weakref
|
||||
import gc
|
||||
import sys
|
||||
import weakref
|
||||
import unittest as pyunit
|
||||
|
||||
from twisted.python.compat import NativeStringIO, _PY3, _PYPY
|
||||
|
|
Loading…
Reference in New Issue