Skip to content

Commit 13d0305

Browse files
Fix lints
1 parent 61a5d10 commit 13d0305

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

.pylintrc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,6 @@ max-line-length=100
257257
# Maximum number of lines in a module
258258
max-module-lines=1000
259259

260-
# List of optional constructs for which whitespace checking is disabled. `dict-
261-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
262-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
263-
# `empty-line` allows space-only lines.
264-
no-space-check=trailing-comma,
265-
dict-separator
266-
267260
# Allow the body of a class to be on the same line as the declaration if body
268261
# contains single statement.
269262
single-line-class-stmt=no

src/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def filter_data(content, to_return, max_date):
5858

5959

6060
def get_url_data(url, headers, params):
61-
res = requests.get(url, headers=headers, params=params)
61+
res = requests.get(url, headers=headers, params=params, timeout=30)
6262
if res.status_code != 200:
6363
if res.status_code == 403:
6464
# We reached the rate limit.

src/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def post_content(url, token, details, method='post', header_extras=None):
120120
try:
121121
req = None
122122
if method == 'post':
123-
req = requests.post(url, data=json.dumps(details), headers=headers)
123+
req = requests.post(url, data=json.dumps(details), headers=headers, timeout=30)
124124
else:
125-
req = requests.put(url, data=json.dumps(details), headers=headers)
125+
req = requests.put(url, data=json.dumps(details), headers=headers, timeout=30)
126126
try:
127127
req.raise_for_status()
128128
except Exception:

0 commit comments

Comments
 (0)