Skip to content

Commit 0ffbe31

Browse files
committed
docformatter wants the blank lines gone
1 parent 19c166d commit 0ffbe31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+0
-198
lines changed

examples/test_binary_search.py

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
2424
It also demonstrates the useful testing technique of testing how the answer
2525
should change (or not) in response to movements in the underlying data.
26-
2726
"""
2827

2928
from __future__ import division, print_function, absolute_import
@@ -40,7 +39,6 @@ def binary_search(ls, v):
4039
4140
1. ls.insert(i, v) is sorted
4241
2. ls.insert(j, v) is not sorted for j < i
43-
4442
"""
4543
# Without this check we will get an index error on the next line when the
4644
# list is empty.
@@ -134,7 +132,6 @@ def test_inserts_into_same_place_twice(ls, v):
134132
135133
This is an instance of a good general category of test: Testing how the
136134
function moves in responses to changes in the underlying data.
137-
138135
"""
139136
i = binary_search(ls, v)
140137
ls.insert(i, v)

examples/test_rle.py

-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
2828
It also has an example of testing invariants in response to changes in the
2929
underlying data.
30-
3130
"""
3231

3332
from __future__ import division, print_function, absolute_import
@@ -79,7 +78,6 @@ def test_decodes_to_starting_sequence(ls):
7978
original sequence back.
8079
8180
Otherwise we've done something very wrong.
82-
8381
"""
8482
assert run_length_decode(run_length_encode(ls)) == ls
8583

@@ -92,7 +90,6 @@ def test_duplicating_an_element_does_not_increase_length(ls, data):
9290
In this test we deliberately introduce or extend a run and assert
9391
that this does not increase the length of our encoding, because they
9492
should be part of the same run in the final result.
95-
9693
"""
9794
# We use assume to get a valid index into the list. We could also have used
9895
# e.g. flatmap, but this is relatively straightforward and will tend to

scripts/hypothesistooling.py

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ def build_jobs():
162162
Note: This usage of Travis has been somewhat reverse engineered due
163163
to a certain dearth of documentation as to what values what takes
164164
when.
165-
166165
"""
167166
import requests
168167

src/hypothesis/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
2121
It verifies your code against a wide range of input and minimizes any
2222
failing examples it finds.
23-
2423
"""
2524

2625

src/hypothesis/_settings.py

-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
2020
Either an explicit settings object can be used or the default object on
2121
this module can be modified.
22-
2322
"""
2423

2524
from __future__ import division, print_function, absolute_import
@@ -116,7 +115,6 @@ class settings(settingsMeta('settings', (object,), {})):
116115
117116
Default values are picked up from the settings.default object and
118117
changes made there will be picked up in newly created settings.
119-
120118
"""
121119

122120
_WHITELISTED_REAL_PROPERTIES = [
@@ -193,7 +191,6 @@ def define_setting(
193191
- default is the default value. This may be a zero argument
194192
function in which case it is evaluated and its result is stored
195193
the first time it is accessed on any given settings object.
196-
197194
"""
198195
if settings.__definitions_are_locked:
199196
from hypothesis.errors import InvalidState
@@ -265,7 +262,6 @@ def database(self):
265262
database_file setting is not None this will be lazily loaded as
266263
an ExampleDatabase, using that file the first time that this
267264
property is accessed on a particular thread.
268-
269265
"""
270266
if self._database is not_set and self.database_file is not None:
271267
from hypothesis.database import ExampleDatabase
@@ -294,7 +290,6 @@ def register_profile(name, settings):
294290
These settings can be loaded in by name. Enable different
295291
defaults for different settings. ``settings`` must be a
296292
settings object.
297-
298293
"""
299294
settings._profiles[name] = settings
300295

@@ -306,7 +301,6 @@ def get_profile(name):
306301
to load
307302
A InvalidArgument exception will be thrown if the
308303
profile does not exist
309-
310304
"""
311305
try:
312306
return settings._profiles[name]
@@ -324,7 +318,6 @@ def load_profile(name):
324318
325319
Any setting not defined in the profile will be the library
326320
defined default for that setting
327-
328321
"""
329322
settings._current_profile = name
330323
settings._assign_default_internal(settings.get_profile(name))
@@ -482,7 +475,6 @@ class HealthCheck(Enum):
482475
"""Arguments for :attr:`~hypothesis.settings.suppress_health_check`.
483476
484477
Each member of this enum is a type of health check to suppress.
485-
486478
"""
487479

488480
exception_in_generation = 0

src/hypothesis/control.py

-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def assume(condition):
3535
3636
This allows you to specify properties that you *assume* will be
3737
true, and let Hypothesis try to avoid similar examples in future.
38-
3938
"""
4039
if not condition:
4140
raise UnsatisfiedAssumption()
@@ -95,7 +94,6 @@ def cleanup(teardown):
9594
Inside a test this isn't very interesting, because you can just use
9695
a finally block, but note that you can use this inside map, flatmap,
9796
etc. in order to e.g. insist that a value is closed at the end.
98-
9997
"""
10098
context = _current_build_context.value
10199
if context is None:
@@ -121,7 +119,6 @@ def event(value):
121119
statistics reporting mode.
122120
123121
Events should be strings or convertible to them.
124-
125122
"""
126123
context = _current_build_context.value
127124
if context is None:

src/hypothesis/core.py

-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def reproduce_failure(version, blob):
133133
in the event that you don't have access to the test database. Because of
134134
this, *no* compatibility guarantees are made between different versions of
135135
Hypothesis - its API may change arbitrarily from version to version.
136-
137136
"""
138137
def accept(test):
139138
test._hypothesis_internal_use_reproduce_failure = (version, blob)
@@ -349,7 +348,6 @@ def skip_exceptions_to_reraise():
349348
350349
This is intended to cover most common test runners; if you would
351350
like another to be added please open an issue or pull request.
352-
353351
"""
354352
import unittest
355353
# This is a set because nose may simply re-export unittest.SkipTest
@@ -885,7 +883,6 @@ def given(*given_arguments, **given_kwargs):
885883
randomized test.
886884
887885
This is the main entry point to Hypothesis.
888-
889886
"""
890887
def run_test_with_generator(test):
891888
generator_arguments = tuple(given_arguments)

src/hypothesis/database.py

-4
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,20 @@ class ExampleDatabase(EDMeta('ExampleDatabase', (object,), {})):
6060
A key -> multiple distinct values mapping.
6161
6262
Keys and values are binary data.
63-
6463
"""
6564

6665
def save(self, key, value):
6766
"""Save ``value`` under ``key``.
6867
6968
If this value is already present for this key, silently do
7069
nothing
71-
7270
"""
7371
raise NotImplementedError('%s.save' % (type(self).__name__))
7472

7573
def delete(self, key, value):
7674
"""Remove this value from this key.
7775
7876
If this value is not present, silently do nothing.
79-
8077
"""
8178
raise NotImplementedError('%s.delete' % (type(self).__name__))
8279

@@ -87,7 +84,6 @@ def move(self, src, dest, value):
8784
8885
Note that value will be inserted at dest regardless of whether
8986
it is currently present at src.
90-
9187
"""
9288
if src == dest:
9389
self.save(src, value)

src/hypothesis/errors.py

-7
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class UnsatisfiedAssumption(HypothesisException):
3030
"""An internal error raised by assume.
3131
3232
If you're seeing this error something has gone wrong.
33-
3433
"""
3534

3635

@@ -41,7 +40,6 @@ class BadTemplateDraw(HypothesisException):
4140
4241
This is not an error condition internally, but if you ever see this
4342
in your code it's probably a Hypothesis bug
44-
4543
"""
4644

4745

@@ -50,7 +48,6 @@ class NoSuchExample(HypothesisException):
5048
5149
This does not guarantee that no example exists, only that we were
5250
unable to find one.
53-
5451
"""
5552

5653
def __init__(self, condition_string, extra=''):
@@ -66,7 +63,6 @@ class DefinitelyNoSuchExample(NoSuchExample): # pragma: no cover
6663
6764
This exception remains for compatibility reasons for now but can
6865
never actually be thrown.
69-
7066
"""
7167

7268

@@ -86,7 +82,6 @@ class Unsatisfiable(HypothesisException):
8682
strategy or using a better starting point (e.g if you are requiring
8783
a list has unique values you could instead filter out all duplicate
8884
values from the list)
89-
9085
"""
9186

9287

@@ -104,7 +99,6 @@ class Flaky(HypothesisException):
10499
3. The function is timing sensitive and can fail or pass depending on
105100
how long it takes. Try breaking it up into smaller functions which
106101
don't do that and testing those instead.
107-
108102
"""
109103

110104

@@ -134,7 +128,6 @@ class ResolutionFailed(InvalidArgument):
134128
Type inference is best-effort, so this only happens when an
135129
annotation exists but could not be resolved for a required argument
136130
to the target of ``builds()``, or where the user passed ``infer``.
137-
138131
"""
139132

140133

src/hypothesis/extra/datetime.py

-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
2020
It depends on the ``pytz`` package, which is stable enough that almost any
2121
version should be compatible - most updates are for the timezone database.
22-
2322
"""
2423

2524
from __future__ import division, print_function, absolute_import
@@ -74,7 +73,6 @@ def datetimes(allow_naive=None, timezones=None, min_year=None, max_year=None):
7473
available via pytz will be used.
7574
7675
All generated datetimes will be between min_year and max_year, inclusive.
77-
7876
"""
7977
note_deprecation('Use hypothesis.strategies.datetimes, which supports '
8078
'full-precision bounds and has a simpler API.')
@@ -92,7 +90,6 @@ def dates(min_year=None, max_year=None):
9290
use :py:func:`hypothesis.strategies.dates` instead.
9391
9492
All generated dates will be between min_year and max_year, inclusive.
95-
9693
"""
9794
note_deprecation('Use hypothesis.strategies.dates, which supports bounds '
9895
'given as date objects for single-day resolution.')
@@ -109,7 +106,6 @@ def times(allow_naive=None, timezones=None):
109106
110107
The allow_naive and timezones arguments act the same as the datetimes
111108
strategy above.
112-
113109
"""
114110
note_deprecation('Use hypothesis.strategies.times, which supports '
115111
'min_time and max_time arguments.')

src/hypothesis/extra/django/models.py

-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ def models(model, **field_strategies):
186186
be generated with::
187187
188188
shop_strategy = models(Shop, company=models(Company))
189-
190189
"""
191190
result = {k: v for k, v in field_strategies.items()
192191
if v is not default_value}

src/hypothesis/extra/numpy.py

-6
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ def arrays(
298298
primarily designed around testing small examples. If you have arrays with
299299
hundreds or more elements, having a fill value is essential if you want
300300
your tests to run in reasonable time.
301-
302301
"""
303302
if isinstance(dtype, SearchStrategy):
304303
dtype = draw(dtype)
@@ -383,7 +382,6 @@ def unsigned_integer_dtypes(endianness='?', sizes=(8, 16, 32, 64)):
383382
384383
sizes must be a collection of integer sizes in bits. The default
385384
(8, 16, 32, 64) covers the full range of sizes.
386-
387385
"""
388386
return dtype_factory('u', sizes, (8, 16, 32, 64), endianness)
389387

@@ -394,7 +392,6 @@ def integer_dtypes(endianness='?', sizes=(8, 16, 32, 64)):
394392
395393
endianness and sizes are treated as for
396394
:func:`unsigned_integer_dtypes`.
397-
398395
"""
399396
return dtype_factory('i', sizes, (8, 16, 32, 64), endianness)
400397

@@ -409,7 +406,6 @@ def floating_dtypes(endianness='?', sizes=(16, 32, 64)):
409406
Larger floats (96 and 128 bit real parts) are not supported on all
410407
platforms and therefore disabled by default. To generate these dtypes,
411408
include these values in the sizes argument.
412-
413409
"""
414410
return dtype_factory('f', sizes, (16, 32, 64, 96, 128), endianness)
415411

@@ -421,7 +417,6 @@ def complex_number_dtypes(endianness='?', sizes=(64, 128)):
421417
sizes is the total size in bits of a complex number, which consists
422418
of two floats. Complex halfs (a 16-bit real part) are not supported
423419
by numpy and will not be generated by this strategy.
424-
425420
"""
426421
return dtype_factory('c', sizes, (64, 128, 192, 256), endianness)
427422

@@ -503,7 +498,6 @@ def nested_dtypes(subtype_strategy=scalar_dtypes(),
503498
:func:`array_dtypes` with ``allow_subarrays=True``. Subdtypes in an
504499
array dtype may be nested to any depth, subject to the max_leaves
505500
argument.
506-
507501
"""
508502
return st.recursive(subtype_strategy,
509503
lambda x: array_dtypes(x, allow_subarrays=True),

src/hypothesis/extra/pandas/impl.py

-6
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def range_indexes(min_size=0, max_size=None):
156156
* min_size is the smallest number of elements the index can have.
157157
* max_size is the largest number of elements the index can have. If None
158158
it will default to some suitable value based on min_size.
159-
160159
"""
161160
check_valid_size(min_size, 'min_size')
162161
check_valid_size(max_size, 'max_size')
@@ -189,7 +188,6 @@ def indexes(
189188
should pass a max_size explicitly.
190189
* unique specifies whether all of the elements in the resulting index
191190
should be distinct.
192-
193191
"""
194192
check_valid_size(min_size, 'min_size')
195193
check_valid_size(max_size, 'max_size')
@@ -238,7 +236,6 @@ def series(elements=None, dtype=None, index=None, fill=None, unique=False):
238236
>>> series(dtype=int).example()
239237
0 -2001747478
240238
1 1153062837
241-
242239
"""
243240
if index is None:
244241
index = range_indexes()
@@ -292,7 +289,6 @@ class column(object):
292289
* fill: A default value for elements of the column. See
293290
:func:`~hypothesis.extra.numpy.arrays` for a full explanation.
294291
* unique: If all values in this column should be distinct.
295-
296292
"""
297293

298294
name = attr.ib(default=None)
@@ -313,7 +309,6 @@ def columns(
313309
objects, or a number, in which case that many unnamed columns will
314310
be created. All other arguments are passed through verbatim to
315311
create the columns.
316-
317312
"""
318313
try:
319314
names = list(names_or_number)
@@ -431,7 +426,6 @@ def data_frames(
431426
dicts are passed, if there are keys with no corresponding column name,
432427
if sequences are passed if there are too many items) will result in
433428
InvalidArgument being raised.
434-
435429
"""
436430
if index is None:
437431
index = range_indexes()

0 commit comments

Comments
 (0)