Projet

Général

Profil

0034-misc-fix-no-self-argument-pylint-error-62099.patch

Lauréline Guérin, 22 mars 2022 10:30

Télécharger (2,93 ko)

Voir les différences:

Subject: [PATCH 34/65] misc: fix no-self-argument pylint error (#62099)

 passerelle/contrib/rsa13/models.py | 55 ++++++++++++++++--------------
 tests/test_jsonresponse.py         |  2 +-
 2 files changed, 30 insertions(+), 27 deletions(-)
passerelle/contrib/rsa13/models.py
35 35
DATE_SCHEMA = {'type': 'string', 'format': 'date'}
36 36

  
37 37

  
38
def parameters(update=None):
39
    update = update or ()
40
    d = {
41
        'email': {
42
            'description': _('Publik known email'),
43
            'example_value': 'john.doe@example.com',
44
        },
45
        'ip': {
46
            'description': _('Publik client IP'),
47
            'example_value': '88.67.23.45',
48
        },
49
    }
50
    d.update(update)
51
    return d
52

  
53

  
54
def response_schema(data_schema=None):
55
    schema = {
56
        'type': 'object',
57
        'required': ['err'],
58
        'properties': {
59
            'err': {'enum': [0, 1]},
60
        },
61
    }
62
    if data_schema:
63
        schema['properties']['data'] = data_schema
64
    return schema
65

  
66

  
38 67
class RSA13Resource(BaseResource, HTTPResource):
39 68
    category = _('Business Process Connectors')
40 69

  
......
92 121
        if response.json().get('ping') != 'pong':
93 122
            raise APIError('ping/pong expected received: "%s"' % repr(response)[:1024])
94 123

  
95
    def parameters(update=()):
96
        d = {
97
            'email': {
98
                'description': _('Publik known email'),
99
                'example_value': 'john.doe@example.com',
100
            },
101
            'ip': {
102
                'description': _('Publik client IP'),
103
                'example_value': '88.67.23.45',
104
            },
105
        }
106
        d.update(update)
107
        return d
108

  
109
    def response_schema(data_schema=None):
110
        schema = {
111
            'type': 'object',
112
            'required': ['err'],
113
            'properties': {
114
                'err': {'enum': [0, 1]},
115
            },
116
        }
117
        if data_schema:
118
            schema['properties']['data'] = data_schema
119
        return schema
120

  
121 124
    @endpoint(
122 125
        description=_('Get nomenclature'),
123 126
        long_description=_('Domain can be: MOTICLODAC, MOTIF_FIN_ACC, RESULTAT_RDV, RELANCE_RDV'),
tests/test_jsonresponse.py
18 18
    http_status = 488
19 19
    log_error = False
20 20

  
21
    def __str__(sefl):
21
    def __str__(self):
22 22
        return 'log as warning exception'
23 23

  
24 24

  
25
-