Skip to content

Commit 30d46ba

Browse files
committed
Fix copyright, use typing notation for lists
1 parent 4950648 commit 30d46ba

File tree

6 files changed

+20
-13
lines changed

6 files changed

+20
-13
lines changed

docs/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@
1818
#
1919
import os
2020
import sys
21+
from datetime import datetime
22+
23+
2124
sys.path.insert(0, os.path.abspath('..'))
2225

26+
2327
from scrapinghub import __version__ # noqa
28+
29+
30+
YEAR = datetime.now().year
2431
VERSION = __version__.rsplit('.', 2)[0]
2532

2633
# -- General configuration ------------------------------------------------
@@ -48,8 +55,8 @@
4855

4956
# General information about the project.
5057
project = u'scrapinghub'
51-
copyright = u'2017, Pablo Hoffman, Daniel Graña'
52-
author = u'Pablo Hoffman, Daniel Graña'
58+
copyright = u'2010-{}, Scrapinghub'.format(YEAR)
59+
author = u'Scrapinghub'
5360

5461
# The version info for the project you're documenting, acts as replacement for
5562
# |version| and |release|, also used in various other places throughout the

scrapinghub/client/collections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def list(self):
9191
9292
:return: a list of collections where each collection is
9393
represented by a dictionary with ('name','type') fields.
94-
:rtype: list of dicts
94+
:rtype: List[dict]
9595
"""
9696
return list(self.iter())
9797

@@ -171,7 +171,7 @@ def list(self, key=None, prefix=None, prefixcount=None, startts=None,
171171
:param requests_params: (optional) a dict with optional requests params.
172172
:param \*\*params: (optional) additional query params for the request.
173173
:return: a list of items where each item is represented with a dict.
174-
:rtype: list of dicts
174+
:rtype: List[dict]
175175
"""
176176
# FIXME there should be similar docstrings for iter/iter_raw_json
177177
# but as we proxy them as-is, it's not in place, should be improved

scrapinghub/client/frontiers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def list(self):
171171
"""List all slots.
172172
173173
:return: a list of frontier slots names.
174-
:rtype: list of strings
174+
:rtype: List[str]
175175
"""
176176
return next(self._frontiers._origin.apiget((self.key, 'list')))
177177

@@ -315,7 +315,7 @@ def list(self, **params):
315315
316316
:param \*\*params: (optional) additional query params for the request.
317317
:return: a list of fingerprints.
318-
:rtype: list of strings
318+
:rtype: List[str]
319319
"""
320320
return list(self.iter(**params))
321321

@@ -353,7 +353,7 @@ def list(self, mincount=None, **params):
353353
:param \*\*params: (optional) additional query params for the request.
354354
:return: a list of request batches in the queue where each batch
355355
is represented with a dict with ('id', 'requests') field.
356-
:rtype: list of dicts
356+
:rtype: List[dict]
357357
"""
358358
return list(self.iter(mincount=mincount, **params))
359359

scrapinghub/client/jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def list(self, count=None, start=None, spider=None, state=None,
164164
:param \*\*params: (optional) other filter params.
165165
166166
:return: list of dictionaries of jobs summary for a given filter params
167-
:rtype: list of dicts
167+
:rtype: List[dict]
168168
169169
Please note that list() method can use a lot of memory and for a large
170170
amount of jobs it's recommended to iterate through it via iter()
@@ -260,7 +260,7 @@ def summary(self, state=None, spider=None, **params):
260260
:param \*\*params: (optional) additional keyword args.
261261
:return: a list of dictionaries of jobs summary
262262
for a given filter params grouped by job state.
263-
:rtype: list of dicts
263+
:rtype: List[dict]
264264
265265
Usage::
266266

scrapinghub/client/projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def list(self):
4646
"""Get list of projects available to current user.
4747
4848
:return: a list of project ids.
49-
:rtype: list of integers
49+
:rtype: List[int]
5050
5151
Usage::
5252
@@ -72,7 +72,7 @@ def summary(self, state=None, **params):
7272
:return: a list of dictionaries: each dictionary represents a project
7373
summary (amount of pending/running/finished jobs and a flag if it
7474
has a capacity to run new jobs).
75-
:rtype: list of dicts
75+
:rtype: List[dict]
7676
7777
Usage::
7878

scrapinghub/client/spiders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def list(self):
5252
"""Get a list of spiders for a project.
5353
5454
:return: a list of dictionaries with spiders metadata.
55-
:rtype: list of dicts
55+
:rtype: List[dict]
5656
5757
Usage::
5858
@@ -122,7 +122,7 @@ def list_tags(self):
122122
"""List spider tags.
123123
124124
:return: a list of spider tags.
125-
:rtype: list of strings
125+
:rtype: List[str]
126126
"""
127127
path = 'v2/projects/{}/spiders/{}'.format(self.project_id, self._id)
128128
url = urljoin(self._client._connection.url, path)

0 commit comments

Comments
 (0)