Pylint: fixed 'keyword-arg-before-vararg' and module order issues
This commit is contained in:
parent
498a36bba3
commit
05a81aa993
|
@ -26,10 +26,10 @@ import json
|
|||
import os
|
||||
import urlparse
|
||||
|
||||
import magic
|
||||
|
||||
from urllib import quote
|
||||
|
||||
import magic
|
||||
|
||||
from django.db import models
|
||||
from django.http import Http404
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -506,15 +506,7 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
|
||||
@endpoint(
|
||||
description=_("Test an openADS 'connexion'")
|
||||
# get={
|
||||
# 'description': _("Test an openADS 'connexion'"),
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_CHECK_STATUS_OUT
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
)
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# pylint: disable=unused-argument,arguments-differ
|
||||
def check_status(self, request=None, *args, **kwargs):
|
||||
"""Check avaibility of the openADS.API service."""
|
||||
|
@ -546,13 +538,8 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
'application/json': JSON_SCHEMA_CREATE_DOSSIER_IN
|
||||
} # pylint: disable=too-many-statements,too-many-branches,too-many-locals,too-many-arguments
|
||||
}
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_CREATE_DOSSIER_OUT
|
||||
# }
|
||||
# }
|
||||
}
|
||||
)
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# pylint: disable=unused-argument
|
||||
def create_dossier(self, request, type_dossier, type_dossier_detaille=None, collectivite=None,
|
||||
now=None, *args, **kwargs):
|
||||
|
@ -879,16 +866,8 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
'type_dossier': {'description': _("Type of 'dossier'"), 'example_value': 'DIA'},
|
||||
'numero_dossier': {'description': _("Identifier for 'dossier'"),
|
||||
'example_value': 'DIA0130551900001'}
|
||||
},
|
||||
# get={
|
||||
# 'description': _("Get informations about an openADS 'dossier'"),
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_GET_DOSSIER_OUT
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
)
|
||||
}
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# pylint: disable=unused-argument
|
||||
def get_dossier(self, request, type_dossier, numero_dossier, *args, **kwargs):
|
||||
"""Get informations about an openADS 'dossier'."""
|
||||
|
@ -926,16 +905,8 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
'example_value': 'DIA0130551900001'},
|
||||
'fichier_id': {'description': _("File identifier"),
|
||||
'example_value': '78'}
|
||||
},
|
||||
# get={
|
||||
# 'description': _("Get informations about the forwarding of user files to openADS"),
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_GET_FWD_FILES_OUT
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
)
|
||||
}
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# pylint: disable=unused-argument,no-self-use
|
||||
def get_fwd_files(self, request, numero_dossier, fichier_id=None, *args, **kwargs):
|
||||
"""Get informations about the forwarding of user files to openADS."""
|
||||
|
@ -989,16 +960,8 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
'example_value': 'DIA0130551900001'},
|
||||
'fichier_id': {'description': _("File identifier"),
|
||||
'example_value': '78'}
|
||||
},
|
||||
# get={
|
||||
# 'description': _("Get informations about the forwarding of a user file to openADS"),
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_GET_FWD_FILES_STATUS_OUT
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
)
|
||||
}
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# pylint: disable=unused-argument
|
||||
def get_fwd_files_status(self, request, numero_dossier, fichier_id=None, *args, **kwargs):
|
||||
"""Get informations about the forwarding of a user file to openADS."""
|
||||
|
@ -1040,16 +1003,8 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
'example_value': 'DIA0130551900001'},
|
||||
'lettre_type': {'description': _("Courrier ID to get"),
|
||||
'example_value': 'dia_renonciation_preempter'}
|
||||
},
|
||||
# get={
|
||||
# 'description': _("Get a 'courrier' from an openADS 'dossier'"),
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_GET_COURRIER_OUT
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
)
|
||||
}
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# pylint: disable=unused-argument
|
||||
def get_courrier(self, request, type_dossier, numero_dossier, lettre_type, *args, **kwargs):
|
||||
"""Get a 'courrier' from an openADS 'dossier'."""
|
||||
|
@ -1129,16 +1084,8 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
'file_ids': {'description': _(("List of ForwardFile IDs to upload "
|
||||
"(coma separated)")),
|
||||
'example_value': '12,18'}
|
||||
}, # pylint: disable=too-many-statements,too-many-branches,too-many-locals
|
||||
# get={
|
||||
# 'description': _("Trigger the uploading of user's files to openADS"),
|
||||
# 'response_body': {
|
||||
# 'schema': {
|
||||
# 'application/json': JSON_SCHEMA_UPLOAD_USER_FILES
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
)
|
||||
} # pylint: disable=too-many-statements,too-many-branches,too-many-locals
|
||||
) # pylint: disable=keyword-arg-before-vararg
|
||||
# @raise ForwareFile.DoesNotExist if not found
|
||||
# pylint: disable=unused-argument
|
||||
def upload_user_files(self, request, type_dossier, numero_dossier, file_ids=None,
|
||||
|
@ -1320,6 +1267,7 @@ class AtrealOpenads(BaseResource, HTTPResource, BaseModel):
|
|||
# return something to please pylint
|
||||
return True
|
||||
|
||||
# pylint: disable=keyword-arg-before-vararg
|
||||
@endpoint(
|
||||
perm='can_access',
|
||||
description=_("Get the type of 'courrier' of an openADS 'dossier'"),
|
||||
|
|
Reference in New Issue