Skip to content

Commit beeb82c

Browse files
smcollagjohnson
authored andcommitted
linting for cdn module (readthedocs#2878)
* linting for cdn module * maybe better not change the function signature...
1 parent 3974ed4 commit beeb82c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

prospector-more.yml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ inherits: prospector
33
strictness: medium
44

55
ignore-paths:
6-
- cdn/
76
- core/
87
- doc_builder/
98
- donate/

readthedocs/cdn/purge.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Utility to purge MaxCDN files, if configured."""
2+
13
import logging
24

35
from django.conf import settings
@@ -19,10 +21,12 @@ def chunks(in_list, chunk_size):
1921
from maxcdn import MaxCDN
2022
api = MaxCDN(CDN_USERNAME, CDN_KEY, CDN_SECRET)
2123

24+
# pylint: disable=redefined-builtin
25+
2226
def purge(id, files):
2327
# We can only purge up to 250 files per request
2428
for chunk in chunks(files, 200):
2529
return api.purge(id, chunk)
2630
else:
27-
def purge(id, files):
31+
def purge(*__):
2832
log.error("CDN not configured, can't purge files")

0 commit comments

Comments
 (0)