Skip to content

Commit 3e9fe8c

Browse files
committed
Linting error fixed
1 parent e668412 commit 3e9fe8c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

readthedocs/projects/forms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class ProjectRelationshipBaseForm(forms.ModelForm):
268268

269269
class Meta(object):
270270
model = ProjectRelationship
271-
exclude = []
271+
fields = '__all__'
272272

273273
def __init__(self, *args, **kwargs):
274274
self.project = kwargs.pop('project')
@@ -634,7 +634,7 @@ class DomainForm(forms.ModelForm):
634634

635635
class Meta(object):
636636
model = Domain
637-
exclude = ['machine', 'cname', 'count']
637+
exclude = ['machine', 'cname', 'count'] # pylint: disable=modelform-uses-exclude
638638

639639
def __init__(self, *args, **kwargs):
640640
self.project = kwargs.pop('project', None)
@@ -674,7 +674,7 @@ class IntegrationForm(forms.ModelForm):
674674

675675
class Meta(object):
676676
model = Integration
677-
exclude = ['provider_data', 'exchanges']
677+
exclude = ['provider_data', 'exchanges'] # pylint: disable=modelform-uses-exclude
678678

679679
def __init__(self, *args, **kwargs):
680680
self.project = kwargs.pop('project', None)

readthedocs/projects/version_handling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def prune_point(self, num_latest):
7474
try:
7575
self._state[major][minor] = sorted(
7676
set(self._state[major][minor]))[-num_latest:]
77-
except TypeError:
77+
except TypeError: # pylint: disable=try-except-raise
7878
# Raise these for now.
7979
raise
8080

readthedocs/vcs_support/backends/git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def parse_branches(self, data):
171171
delimiter = str(' ').encode('utf-8') if PY2 else str(' ')
172172
raw_branches = csv.reader(StringIO(data), delimiter=delimiter)
173173
for branch in raw_branches:
174-
branch = [f for f in branch if f != '' and f != '*']
174+
branch = [f for f in branch if f not in ('', '*')]
175175
# Handle empty branches
176176
if branch:
177177
branch = branch[0]

readthedocs/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# This application object is used by any WSGI server configured to use this
99
# file. This includes Django's development server, if the WSGI_APPLICATION
1010
# setting points here.
11-
from django.core.wsgi import get_wsgi_application # pylint: disable=wrong-import-position
11+
from django.core.wsgi import get_wsgi_application # pylint: disable=wrong-import-position # noqa
1212
application = get_wsgi_application()
1313

1414
# Apply WSGI middleware here.

0 commit comments

Comments
 (0)