Denis Bilenko avatar Denis Bilenko committed f41b810

let's follow pep8?

Comments (0)

Files changed (4)

geventwebsocket/__init__.py

 
 version_info = (0, 3, 0, 'dev')
-__version__ =  ".".join(map(str, version_info))
+__version__ = ".".join(map(str, version_info))
 
 __all__ = ['WebSocketHandler']
 

geventwebsocket/gunicorn/workers.py

 from geventwebsocket.handler import WebSocketHandler
 from gunicorn.workers.ggevent import GeventPyWSGIWorker
 
+
 class GeventWebSocketWorker(GeventPyWSGIWorker):
     wsgi_handler = WebSocketHandler

geventwebsocket/handler.py

 
         if secure:
             if environ['SERVER_PORT'] != '443':
-               url += ':' + environ['SERVER_PORT']
+                url += ':' + environ['SERVER_PORT']
         else:
             if environ['SERVER_PORT'] != '80':
-               url += ':' + environ['SERVER_PORT']
+                url += ':' + environ['SERVER_PORT']
 
     url += quote(environ.get('SCRIPT_NAME', ''))
     url += quote(environ.get('PATH_INFO', ''))

geventwebsocket/websocket.py

                 masked_payload = bytearray(payload)
 
                 for i in range(len(masked_payload)):
-                    masked_payload[i] = masked_payload[i] ^ masking_key[i%4]
+                    masked_payload[i] = masked_payload[i] ^ masking_key[i % 4]
 
                 payload = masked_payload
 
         ## +-+-+-+-+-------+
         header = chr(
             (fin << 7) |
-            (0 << 6) | # RSV1
-            (0 << 5) | # RSV2
-            (0 << 4) | # RSV3
+            (0 << 6) |  # RSV1
+            (0 << 5) |  # RSV2
+            (0 << 4) |  # RSV3
             opcode
         )
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.