Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 285981a

Browse files
committed
Cleanup for green doc8 tests
1 parent 0164c26 commit 285981a

File tree

14 files changed

+37
-22
lines changed

14 files changed

+37
-22
lines changed

raven/base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class Client(object):
144144
>>> ident = client.get_ident(client.captureException())
145145
>>> print "Exception caught; reference is %s" % ident
146146
"""
147+
147148
logger = logging.getLogger('raven')
148149
protocol_version = '6'
149150

@@ -374,7 +375,6 @@ def build_msg(self, event_type, data=None, date=None,
374375
The result of ``build_msg`` should be a standardized dict, with
375376
all default values available.
376377
"""
377-
378378
# create ID client-side so that it can be passed to application
379379
event_id = uuid.uuid4().hex
380380

@@ -560,6 +560,7 @@ def tags_context(self, data, **kwargs):
560560
Update the tags context for future events.
561561
562562
>>> client.tags_context({'version': '1.0'})
563+
563564
"""
564565
return self.context.merge({
565566
'tags': data,
@@ -618,7 +619,6 @@ def capture(self, event_type, data=None, date=None, time_spent=None,
618619
:param sample_rate: a float in the range [0, 1] to sample this message
619620
:return: a tuple with a 32-length string identifying this event
620621
"""
621-
622622
if not self.is_enabled():
623623
return
624624

@@ -902,7 +902,8 @@ def captureExceptions(self, **kwargs):
902902
return self.context(**kwargs)
903903

904904
def captureBreadcrumb(self, *args, **kwargs):
905-
"""Records a breadcrumb with the current context. They will be
905+
"""
906+
Records a breadcrumb with the current context. They will be
906907
sent with the next event.
907908
"""
908909
# Note: framework integration should not call this method but
@@ -922,6 +923,7 @@ def last_event_id(self, value):
922923

923924

924925
class DummyClient(Client):
925-
"Sends messages into an empty void"
926+
"""Sends messages into an empty void."""
927+
926928
def send(self, **kwargs):
927929
return None

raven/contrib/async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class AsyncClient(Client):
1717
"""
1818
This client uses a single background thread to dispatch errors.
1919
"""
20+
2021
def __init__(self, worker=None, *args, **kwargs):
2122
warnings.warn('AsyncClient is deprecated. Use the threaded+http transport instead.', DeprecationWarning)
2223
self.worker = worker or AsyncWorker()

raven/contrib/bottle/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Sentry(object):
3737
3838
>>> sentry.captureMessage('hello, world!')
3939
"""
40+
4041
def __init__(self, app, client, logging=False):
4142
self.app = app
4243
self.client = client

raven/contrib/django/middleware/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class SentryResponseErrorIdMiddleware(MiddlewareMixin):
6969
Appends the X-Sentry-ID response header for referencing a message within
7070
the Sentry datastore.
7171
"""
72+
7273
def process_response(self, request, response):
7374
if not getattr(request, 'sentry', None):
7475
return response

raven/contrib/django/middleware/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Sentry(Sentry):
1919
>>> from raven.contrib.django.middleware.wsgi import Sentry
2020
>>> application = Sentry(application)
2121
"""
22+
2223
def __init__(self, application):
2324
self.application = application
2425

raven/contrib/django/resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class RouteResolver(object):
1919
_cache = {}
2020

2121
def _simplify(self, pattern):
22-
"""
22+
r"""
2323
Clean up urlpattern regexes into something readable by humans:
2424
2525
From:

raven/contrib/flask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class Sentry(object):
9595
`wrap_wsgi=False`.
9696
- Capture information from Flask-Login (if available).
9797
"""
98+
9899
# TODO(dcramer): the client isn't using local context and therefore
99100
# gets shared by every app that does init on it
100101
def __init__(self, app=None, client=None, client_cls=Client, dsn=None,
@@ -140,8 +141,7 @@ def handle_exception(self, *args, **kwargs):
140141
def get_user_info(self, request):
141142
"""
142143
Requires Flask-Login (https://pypi.python.org/pypi/Flask-Login/)
143-
to be installed
144-
and setup
144+
to be installed and setup.
145145
"""
146146
if not has_flask_login:
147147
return

raven/contrib/tornado/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717

1818

1919
class AsyncSentryClient(Client):
20-
"""A mixin class that could be used along with request handlers to
20+
"""
21+
A mixin class that could be used along with request handlers to
2122
asynchronously send errors to sentry. The client also captures the
2223
information from the request handlers
2324
"""
25+
2426
def __init__(self, *args, **kwargs):
2527
self.validate_cert = kwargs.pop('validate_cert', True)
2628
super(AsyncSentryClient, self).__init__(*args, **kwargs)

raven/contrib/webpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class SentryApplication(web.application):
3737
3838
>>> sentry.captureMessage('hello, world!')
3939
"""
40+
4041
def __init__(self, client, logging=False, **kwargs):
4142
self.client = client
4243
self.logging = logging

raven/contrib/zerorpc/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,25 @@ class SentryMiddleware(object):
2222
2323
Exceptions detected server-side in ZeroRPC will be submitted to Sentry (and
2424
propagated to the client as well).
25-
2625
"""
2726

2827
def __init__(self, hide_zerorpc_frames=True, client=None, **kwargs):
29-
"""Create a middleware object that can be injected in a ZeroRPC server.
28+
"""
29+
Create a middleware object that can be injected in a ZeroRPC server.
3030
3131
- hide_zerorpc_frames: modify the exception stacktrace to remove the
3232
internal zerorpc frames (True by default to make
3333
the stacktrace as readable as possible);
3434
- client: use an existing raven.Client object, otherwise one will be
3535
instantiated from the keyword arguments.
36-
3736
"""
38-
3937
self._sentry_client = client or Client(**kwargs)
4038
self._hide_zerorpc_frames = hide_zerorpc_frames
4139

4240
def server_inspect_exception(self, req_event, rep_event, task_ctx, exc_info):
43-
"""Called when an exception has been raised in the code run by ZeroRPC"""
44-
41+
"""
42+
Called when an exception has been raised in the code run by ZeroRPC
43+
"""
4544
# Hide the zerorpc internal frames for readability, for a REQ/REP or
4645
# REQ/STREAM server the frames to hide are:
4746
# - core.ServerBase._async_task

0 commit comments

Comments
 (0)