[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Minor whitespace fixes



commit 0d60896e0d41a20972463381a165795295de07f5
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Tue Aug 4 17:02:09 2020 -0700

    Minor whitespace fixes
    
    Address minor issues cited by pycodestyle...
    
      STATIC CHECKS
      * /home/atagar/Desktop/stem/stem/response/__init__.py
        line 164  - E302 expected 2 blank lines, found 1     | def _convert_to_onion_client_auth_add(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.onion_client_auth.OnionClientAuthAddResponse':
        line 168  - E302 expected 2 blank lines, found 1     | def _convert_to_onion_client_auth_remove(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.onion_client_auth.OnionClientAuthRemoveResponse':
        line 172  - E302 expected 2 blank lines, found 1     | def _convert_to_onion_client_auth_view(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.onion_client_auth.OnionClientAuthViewResponse':
        line 176  - E302 expected 2 blank lines, found 1     | def _convert_to_mapaddress(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.mapaddress.MapAddressResponse':
    
      * /home/atagar/Desktop/stem/stem/response/onion_client_auth.py
        line 7    - E302 expected 2 blank lines, found 1     | class OnionClientAuthAddResponse(stem.response.ControlMessage):
        line 23   - E302 expected 2 blank lines, found 1     | class OnionClientAuthRemoveResponse(stem.response.ControlMessage):
        line 30   - W291 trailing whitespace                 | # '250 OK',
        line 37   - E302 expected 2 blank lines, found 1     | class OnionClientAuthViewResponse(stem.response.ControlMessage):
---
 stem/response/__init__.py          | 4 ++++
 stem/response/onion_client_auth.py | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/stem/response/__init__.py b/stem/response/__init__.py
index e77312c8..eb6231bd 100644
--- a/stem/response/__init__.py
+++ b/stem/response/__init__.py
@@ -161,18 +161,22 @@ def _convert_to_add_onion(message: 'stem.response.ControlMessage', **kwargs: Any
   stem.response.convert('ADD_ONION', message)
   return message  # type: ignore
 
+
 def _convert_to_onion_client_auth_add(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.onion_client_auth.OnionClientAuthAddResponse':
   stem.response.convert('ONION_CLIENT_AUTH_ADD', message)
   return message  # type: ignore
 
+
 def _convert_to_onion_client_auth_remove(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.onion_client_auth.OnionClientAuthRemoveResponse':
   stem.response.convert('ONION_CLIENT_AUTH_REMOVE', message)
   return message  # type: ignore
 
+
 def _convert_to_onion_client_auth_view(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.onion_client_auth.OnionClientAuthViewResponse':
   stem.response.convert('ONION_CLIENT_AUTH_VIEW', message)
   return message  # type: ignore
 
+
 def _convert_to_mapaddress(message: 'stem.response.ControlMessage', **kwargs: Any) -> 'stem.response.mapaddress.MapAddressResponse':
   stem.response.convert('MAPADDRESS', message)
   return message  # type: ignore
diff --git a/stem/response/onion_client_auth.py b/stem/response/onion_client_auth.py
index 80800bf3..c21f9158 100644
--- a/stem/response/onion_client_auth.py
+++ b/stem/response/onion_client_auth.py
@@ -4,6 +4,7 @@
 import stem.response
 from stem.util import log
 
+
 class OnionClientAuthAddResponse(stem.response.ControlMessage):
   """
   ONION_CLIENT_AUTH_ADD response.
@@ -20,6 +21,7 @@ class OnionClientAuthAddResponse(stem.response.ControlMessage):
     if not self.is_ok():
       raise stem.ProtocolError("ONION_CLIENT_AUTH_ADD response didn't have an OK status: %s" % self)
 
+
 class OnionClientAuthRemoveResponse(stem.response.ControlMessage):
   """
   ONION_CLIENT_AUTH_REMOVE response.
@@ -27,13 +29,14 @@ class OnionClientAuthRemoveResponse(stem.response.ControlMessage):
 
   def _parse_message(self) -> None:
     # ONION_CLIENT_AUTH_REMOVE responds with:
-    # '250 OK', 
+    # '250 OK',
     # '251 No credentials for [service id]',
     # '512 Invalid v3 address [service id]'
 
     if not self.is_ok():
       raise stem.ProtocolError("ONION_CLIENT_AUTH_REMOVE response didn't have an OK status: %s" % self)
 
+
 class OnionClientAuthViewResponse(stem.response.ControlMessage):
   """
   ONION_CLIENT_AUTH_VIEW response.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits