← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~blr/turnip/import-lint into lp:turnip

 

Review: Approve



Diff comments:

> === modified file 'turnip/pack/git.py'
> --- turnip/pack/git.py	2015-04-08 06:25:15 +0000
> +++ turnip/pack/git.py	2015-04-14 18:13:18 +0000
> @@ -15,7 +15,7 @@
>  from twisted.internet.interfaces import IHalfCloseableProtocol
>  # twisted.web.xmlrpc doesn't exist for Python 3 yet, but the non-XML-RPC
>  # bits of this module work.
> -if sys.version_info.major < 3:
> +if sys.version_info.major < 3:  # noqa
>      from twisted.web import xmlrpc
>  from zope.interface import implementer
>  
> @@ -387,8 +387,8 @@
>                  can_authenticate)
>              if 'trailing' in translated and translated['trailing']:
>                  self.die(
> -                    VIRT_ERROR_PREFIX
> -                    + b'NOT_FOUND Repository does not exist.')
> +                    VIRT_ERROR_PREFIX +
> +                    b'NOT_FOUND Repository does not exist.')
>              pathname = translated['path']
>          except xmlrpc.Fault as e:
>              if e.faultCode in (1, 290):
> 
> === modified file 'turnip/pack/helpers.py'
> --- turnip/pack/helpers.py	2015-03-30 10:58:36 +0000
> +++ turnip/pack/helpers.py	2015-04-14 18:13:18 +0000
> @@ -135,8 +135,8 @@
>          os.rename(path, hook_path(hook))
>  
>      for name in os.listdir(hook_path('.')):
> -        if (name != target_name and name not in wanted_hooks
> -                and not name.startswith('tmp')):
> +        if (name != target_name and name not in wanted_hooks and not
> +                name.startswith('tmp')):

It's ugly to separate "not" from the negated condition.  Can you just have "and" at the end of the line and move "not" back where it belongs?

>              try:
>                  os.unlink(hook_path(name))
>              except OSError:
> 
> === modified file 'turnip/pack/ssh.py'
> --- turnip/pack/ssh.py	2015-04-08 07:19:19 +0000
> +++ turnip/pack/ssh.py	2015-04-14 18:13:18 +0000
> @@ -4,10 +4,6 @@
>      unicode_literals,
>      )
>  
> -__all__ = [
> -    "SmartSSHSession",
> -    ]
> -
>  import shlex
>  
>  from lazr.sshserver.auth import (
> @@ -48,6 +44,10 @@
>      encode_request,
>      )
>  
> +__all__ = [
> +    "SmartSSHSession",
> +    ]
> +
>  
>  class SSHPackClientProtocol(PackProtocol):
>      """Bridge between a Git pack connection and a smart SSH request.
> 
> === modified file 'turnip/pack/tests/test_http.py'
> --- turnip/pack/tests/test_http.py	2015-04-10 09:43:39 +0000
> +++ turnip/pack/tests/test_http.py	2015-04-14 18:13:18 +0000
> @@ -148,7 +148,7 @@
>      @defer.inlineCallbacks
>      def test_unsupported_service(self):
>          yield self.performRequest(service=b'foo')
> -        #self.assertEqual(403, self.request.responseCode)
> +        # self.assertEqual(403, self.request.responseCode)
>          self.assertEqual("Unsupported service.", self.request.value)
>  
>      @defer.inlineCallbacks
> 


-- 
https://code.launchpad.net/~blr/turnip/import-lint/+merge/256185
Your team Launchpad code reviewers is subscribed to branch lp:turnip.


References