forked from mirrors/bookwyrm
disable some warnings
This commit is contained in:
parent
1e01e76ac2
commit
2b3daa0227
4 changed files with 4 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
''' customize the info available in context for rendering templates '''
|
||||
from bookwyrm import models
|
||||
|
||||
def site_settings(request):
|
||||
def site_settings(request):# pylint: disable=unused-argument
|
||||
''' include the custom info about the site '''
|
||||
return {
|
||||
'site': models.SiteSettings.objects.get()
|
||||
|
|
|
@ -30,7 +30,7 @@ class CustomForm(ModelForm):
|
|||
visible.field.widget.attrs['rows'] = None
|
||||
visible.field.widget.attrs['class'] = css_classes[input_type]
|
||||
|
||||
|
||||
# pylint: disable=missing-class-docstring
|
||||
class LoginForm(CustomForm):
|
||||
class Meta:
|
||||
model = models.User
|
||||
|
@ -131,6 +131,7 @@ class ImportForm(forms.Form):
|
|||
|
||||
class ExpiryWidget(widgets.Select):
|
||||
def value_from_datadict(self, data, files, name):
|
||||
''' human-readable exiration time buckets '''
|
||||
selected_string = super().value_from_datadict(data, files, name)
|
||||
|
||||
if selected_string == 'day':
|
||||
|
|
|
@ -53,7 +53,7 @@ def import_data(job_id):
|
|||
for item in job.items.all():
|
||||
try:
|
||||
item.resolve()
|
||||
except Exception as e:
|
||||
except Exception as e:# pylint: disable=broad-except
|
||||
logger.exception(e)
|
||||
item.fail_reason = 'Error loading book'
|
||||
item.save()
|
||||
|
|
|
@ -17,9 +17,6 @@ from bookwyrm.signatures import Signature
|
|||
@csrf_exempt
|
||||
def inbox(request, username):
|
||||
''' incoming activitypub events '''
|
||||
# TODO: should do some kind of checking if the user accepts
|
||||
# this action from the sender probably? idk
|
||||
# but this will just throw a 404 if the user doesn't exist
|
||||
try:
|
||||
models.User.objects.get(localname=username)
|
||||
except models.User.DoesNotExist:
|
||||
|
|
Loading…
Reference in a new issue