0008-misc-fix-anomalous-backslash-in-string-pylint-error-.patch
passerelle/apps/airquality/models.py | ||
---|---|---|
43 | 43 |
verbose_name = _('Air Quality') |
44 | 44 | |
45 | 45 |
@endpoint( |
46 |
pattern='^(?P<country>\w+)/(?P<city>\w+)/$', |
|
46 |
pattern=r'^(?P<country>\w+)/(?P<city>\w+)/$',
|
|
47 | 47 |
example_pattern='{country}/{city}/', |
48 | 48 |
parameters={ |
49 | 49 |
'country': {'description': _('Country Code'), 'example_value': 'fr'}, |
passerelle/apps/arpege_ecp/models.py | ||
---|---|---|
74 | 74 | |
75 | 75 |
@endpoint( |
76 | 76 |
name='api', |
77 |
pattern='^users/(?P<nameid>\w+)/forms$', |
|
77 |
pattern=r'^users/(?P<nameid>\w+)/forms$',
|
|
78 | 78 |
perm='can_access', |
79 | 79 |
description='Returns user forms', |
80 | 80 |
) |
passerelle/apps/atal/models.py | ||
---|---|---|
169 | 169 |
methods=['get'], |
170 | 170 |
perm='can_access', |
171 | 171 |
example_pattern='{demande_number}/', |
172 |
pattern='^(?P<demande_number>\w+)/$', |
|
172 |
pattern=r'^(?P<demande_number>\w+)/$',
|
|
173 | 173 |
name='retrieve-details-demande', |
174 | 174 |
parameters={'demande_number': DEMANDE_NUMBER_PARAM}, |
175 | 175 |
) |
... | ... | |
183 | 183 |
methods=['get'], |
184 | 184 |
perm='can_access', |
185 | 185 |
example_pattern='{demande_number}/', |
186 |
pattern='^(?P<demande_number>\w+)/$', |
|
186 |
pattern=r'^(?P<demande_number>\w+)/$',
|
|
187 | 187 |
name='retrieve-etat-travaux', |
188 | 188 |
parameters={'demande_number': DEMANDE_NUMBER_PARAM}, |
189 | 189 |
) |
... | ... | |
195 | 195 |
methods=['get'], |
196 | 196 |
perm='can_access', |
197 | 197 |
example_pattern='{demande_number}/', |
198 |
pattern='^(?P<demande_number>\w+)/$', |
|
198 |
pattern=r'^(?P<demande_number>\w+)/$',
|
|
199 | 199 |
parameters={ |
200 | 200 |
'demande_number': DEMANDE_NUMBER_PARAM, |
201 | 201 |
'full': { |
... | ... | |
289 | 289 |
methods=['get'], |
290 | 290 |
perm='can_access', |
291 | 291 |
example_pattern='{demande_number}/', |
292 |
pattern='^(?P<demande_number>\w+)/$', |
|
292 |
pattern=r'^(?P<demande_number>\w+)/$',
|
|
293 | 293 |
name='new-comments', |
294 | 294 |
parameters={ |
295 | 295 |
'demande_number': DEMANDE_NUMBER_PARAM, |
passerelle/apps/cartads_cs/models.py | ||
---|---|---|
687 | 687 | |
688 | 688 |
@endpoint( |
689 | 689 |
methods=['post'], |
690 |
pattern='^(?P<id_piece>[\w-]+)/(?P<token>[\w:_-]+)/$', |
|
690 |
pattern=r'^(?P<id_piece>[\w-]+)/(?P<token>[\w:_-]+)/$',
|
|
691 | 691 |
description=_('Upload a single document file'), |
692 | 692 |
parameters={ |
693 | 693 |
'id_piece': PIECE_ID_PARAM, |
... | ... | |
726 | 726 |
@endpoint( |
727 | 727 |
methods=['post'], |
728 | 728 |
name='upload', |
729 |
pattern='^(?P<id_piece>[\w-]+)/(?P<token>[\w:_-]+)/(?P<file_upload>[\w:_-]+)/delete/$', |
|
729 |
pattern=r'^(?P<id_piece>[\w-]+)/(?P<token>[\w:_-]+)/(?P<file_upload>[\w:_-]+)/delete/$',
|
|
730 | 730 |
description=_('Delete a single document file'), |
731 | 731 |
parameters={ |
732 | 732 |
'id_piece': PIECE_ID_PARAM, |
... | ... | |
875 | 875 |
self.sync_subscribers_role(dossier) |
876 | 876 | |
877 | 877 |
@endpoint( |
878 |
pattern='^(?P<signed_dossier_id>[\w:_-]+)/$', |
|
878 |
pattern=r'^(?P<signed_dossier_id>[\w:_-]+)/$',
|
|
879 | 879 |
methods=['post'], |
880 | 880 |
description=_('Notification of file processing by Cart@DS CS'), |
881 | 881 |
parameters={ |
passerelle/apps/clicrdv/models.py | ||
---|---|---|
78 | 78 |
ret.append({'id': record['id'], 'text': record['publicname'], 'details': record}) |
79 | 79 |
return {'data': ret} |
80 | 80 | |
81 |
@endpoint(name='interventionsets', pattern='(?P<set>\d+)/') |
|
81 |
@endpoint(name='interventionsets', pattern=r'(?P<set>\d+)/')
|
|
82 | 82 |
def get_interventions(self, request, set, **kwargs): |
83 | 83 |
ret = [] |
84 | 84 |
response = self.request('interventions?interventionset_id=%s' % set) |
passerelle/apps/okina/models.py | ||
---|---|---|
124 | 124 |
query = '' |
125 | 125 |
return {'data': self.get_institutions(query)} |
126 | 126 | |
127 |
@endpoint(name='institutions', pattern='^from-city/(?P<city_insee_code>\d+)/*$') |
|
127 |
@endpoint(name='institutions', pattern=r'^from-city/(?P<city_insee_code>\d+)/*$')
|
|
128 | 128 |
def institutions_from_city(self, request, city_insee_code): |
129 | 129 |
return {'data': self.get_institutions('/subscriberCity/%s' % city_insee_code)} |
130 | 130 | |
... | ... | |
158 | 158 | |
159 | 159 |
@endpoint( |
160 | 160 |
name='stop-areas', |
161 |
pattern='^from-city/(?P<city_insee_code>\d+)/to-institution/(?P<institution_id>\d+)/*$', |
|
161 |
pattern=r'^from-city/(?P<city_insee_code>\d+)/to-institution/(?P<institution_id>\d+)/*$',
|
|
162 | 162 |
) |
163 | 163 |
def stop_areas(self, request, city_insee_code, institution_id): |
164 | 164 |
stops = self.request( |
... | ... | |
196 | 196 |
def origin_destinations(self, request): |
197 | 197 |
return self.get_ods() |
198 | 198 | |
199 |
@endpoint(name='origin-destinations', pattern='^to-institution/(?P<institution_id>\d+)/*$') |
|
199 |
@endpoint(name='origin-destinations', pattern=r'^to-institution/(?P<institution_id>\d+)/*$')
|
|
200 | 200 |
def origin_destinations_to_institution(self, request, institution_id): |
201 | 201 |
return self.get_ods('/institution/%s' % institution_id) |
202 | 202 | |
203 | 203 |
@endpoint( |
204 | 204 |
name='origin-destinations', |
205 |
pattern='^from-stop-area/(?P<stop_area_id>\d+)/to-institution/(?P<institution_id>\d+)/*$', |
|
205 |
pattern=r'^from-stop-area/(?P<stop_area_id>\d+)/to-institution/(?P<institution_id>\d+)/*$',
|
|
206 | 206 |
) |
207 | 207 |
def origin_destinations_from_stop_to_institution(self, request, stop_area_id, institution_id): |
208 | 208 |
endpoint = 'ods/institution/%s/stop-area/%s' % (institution_id, stop_area_id) |
... | ... | |
225 | 225 | |
226 | 226 |
@endpoint( |
227 | 227 |
name='origin-destinations', |
228 |
pattern='^from-city/(?P<city_insee_code>\d+)/to-institution/(?P<institution_id>\d+)/*$', |
|
228 |
pattern=r'^from-city/(?P<city_insee_code>\d+)/to-institution/(?P<institution_id>\d+)/*$',
|
|
229 | 229 |
) |
230 | 230 |
def origin_destinations_from_city_to_institution(self, request, city_insee_code, institution_id): |
231 | 231 |
return self.get_ods('/institution/%s/subscriberCity/%s' % (institution_id, city_insee_code)) |
232 | 232 | |
233 |
@endpoint(name='origin-destinations', pattern='^from-city/(?P<city_insee_code>\d+)/*$') |
|
233 |
@endpoint(name='origin-destinations', pattern=r'^from-city/(?P<city_insee_code>\d+)/*$')
|
|
234 | 234 |
def origin_destinations_from_city(self, request, city_insee_code): |
235 | 235 |
return self.get_ods('/subscriberCity/%s' % city_insee_code) |
236 | 236 | |
... | ... | |
252 | 252 |
raise APIError('payload must be a dict', http_status=400) |
253 | 253 |
return {'data': self.request('subscribers', payload, result_is_list=False)} |
254 | 254 | |
255 |
@endpoint(name='subscriber', pattern='^(?P<subscriber_id>\d+)/*$', methods=['get'], perm='can_access') |
|
255 |
@endpoint(name='subscriber', pattern=r'^(?P<subscriber_id>\d+)/*$', methods=['get'], perm='can_access')
|
|
256 | 256 |
def get_subscriber(self, request, subscriber_id): |
257 | 257 |
return {'data': self.request('subscribers/%s' % subscriber_id, result_is_list=False)} |
258 | 258 | |
259 |
@endpoint(name='subscriber', pattern='^(?P<subscriber_id>\d+)/qrcode/*$', perm='can_access') |
|
259 |
@endpoint(name='subscriber', pattern=r'^(?P<subscriber_id>\d+)/qrcode/*$', perm='can_access')
|
|
260 | 260 |
def get_subscriber_qrcode(self, request, subscriber_id): |
261 | 261 |
qrcode = self.request('subscribers/%s/qrcode' % subscriber_id, result_is_json=False) |
262 | 262 |
content_type = qrcode.headers.get('Content-Type') |
... | ... | |
283 | 283 |
return {'data': subscriptions} |
284 | 284 |
return {'data': self.request('subscriptions', payload, result_is_list=False)} |
285 | 285 | |
286 |
@endpoint(name='subscription', pattern='^(?P<subscription_id>\d+)/*$', methods=['get'], perm='can_access') |
|
286 |
@endpoint( |
|
287 |
name='subscription', pattern=r'^(?P<subscription_id>\d+)/*$', methods=['get'], perm='can_access' |
|
288 |
) |
|
287 | 289 |
def get_subscription(self, request, subscription_id): |
288 | 290 |
return {'data': self.request('subscriptions/%s' % subscription_id, result_is_list=False)} |
passerelle/contrib/gdema/models.py | ||
---|---|---|
213 | 213 | |
214 | 214 |
@endpoint( |
215 | 215 |
name='referentiel', |
216 |
pattern='^(?P<name>\w+)/*$', |
|
216 |
pattern=r'^(?P<name>\w+)/*$',
|
|
217 | 217 |
description=_('Get reference items'), |
218 | 218 |
example_pattern='{name}/', |
219 | 219 |
parameters={ |
... | ... | |
264 | 264 | |
265 | 265 |
@endpoint( |
266 | 266 |
name='get-request', |
267 |
pattern='^(?P<request_id>\d+)/*$', |
|
267 |
pattern=r'^(?P<request_id>\d+)/*$',
|
|
268 | 268 |
description=_('Get request details'), |
269 | 269 |
example_pattern='{request_id}/', |
270 | 270 |
parameters={ |
... | ... | |
282 | 282 | |
283 | 283 |
@endpoint( |
284 | 284 |
name='get-request-state', |
285 |
pattern='^(?P<request_id>\d+)/*$', |
|
285 |
pattern=r'^(?P<request_id>\d+)/*$',
|
|
286 | 286 |
description=_('Get request status'), |
287 | 287 |
example_pattern='{request_id}/', |
288 | 288 |
parameters={ |
passerelle/contrib/iparapheur/models.py | ||
---|---|---|
209 | 209 |
dossier_id = generated_dossier_id |
210 | 210 |
return {'data': {'dossier_id': dossier_id, 'message': resp.MessageRetour.message}} |
211 | 211 | |
212 |
@endpoint(perm='can_access', name='get-file', pattern='(?P<file_id>[\w-]+)') |
|
212 |
@endpoint(perm='can_access', name='get-file', pattern=r'(?P<file_id>[\w-]+)')
|
|
213 | 213 |
def get_file(self, request, file_id, appendix=None): |
214 | 214 |
# We need to disable strict mode since the response |
215 | 215 |
# can be non compliant with the xsd |
... | ... | |
252 | 252 |
) |
253 | 253 |
return response |
254 | 254 | |
255 |
@endpoint(perm='can_access', name='get-file-status', pattern='(?P<file_id>[\w-]+)') |
|
255 |
@endpoint(perm='can_access', name='get-file-status', pattern=r'(?P<file_id>[\w-]+)')
|
|
256 | 256 |
def get_file_status(self, request, file_id): |
257 | 257 |
resp = self.call('GetHistoDossier', file_id) |
258 | 258 |
if not resp or not resp.MessageRetour: |
passerelle/contrib/iws/models.py | ||
---|---|---|
140 | 140 |
methods=['get'], |
141 | 141 |
perm='can_access', |
142 | 142 |
example_pattern='{sti_code}/{request_type}/{volume}/', |
143 |
pattern='^(?P<sti_code>[0-9]{16}.?)/(?P<request_type>\w+)/(?P<volume>[0-9]+)/$', |
|
143 |
pattern=r'^(?P<sti_code>[0-9]{16}.?)/(?P<request_type>\w+)/(?P<volume>[0-9]+)/$',
|
|
144 | 144 |
parameters={ |
145 | 145 |
'sti_code': {'description': _('Address STI code'), 'example_value': '3155570464130003'}, |
146 | 146 |
'request_type': {'description': _('DECHET or ENCOMBRANT'), 'example_value': 'DECHET'}, |
passerelle/contrib/solis_apa/models.py | ||
---|---|---|
147 | 147 | |
148 | 148 |
if query: |
149 | 149 |
query = query.lower() |
150 |
if re.match('^\d\d', query): |
|
150 |
if re.match(r'^\d\d', query):
|
|
151 | 151 |
# query est le debut d'un code postal |
152 | 152 |
code_dep = query[:2] |
153 | 153 |
if not code_dep: |
passerelle/contrib/stub_invoices/models.py | ||
---|---|---|
80 | 80 | |
81 | 81 |
@endpoint( |
82 | 82 |
name='invoice', |
83 |
pattern='^(?P<invoice_id>\w+)/?$', |
|
83 |
pattern=r'^(?P<invoice_id>\w+)/?$',
|
|
84 | 84 |
description=_('Get invoice details'), |
85 | 85 |
example_pattern='{invoice_id}/', |
86 | 86 |
parameters={ |
... | ... | |
95 | 95 | |
96 | 96 |
@endpoint( |
97 | 97 |
name='invoice', |
98 |
pattern='^(?P<invoice_id>\w+)/pdf/?$', |
|
98 |
pattern=r'^(?P<invoice_id>\w+)/pdf/?$',
|
|
99 | 99 |
description=_('Get invoice as a PDF file'), |
100 | 100 |
long_description=_('not yet implemented'), |
101 | 101 |
example_pattern='{invoice_id}/pdf/', |
... | ... | |
116 | 116 |
name='invoice', |
117 | 117 |
perm='can_access', |
118 | 118 |
methods=['post'], |
119 |
pattern='^(?P<invoice_id>\w+)/pay/?$', |
|
119 |
pattern=r'^(?P<invoice_id>\w+)/pay/?$',
|
|
120 | 120 |
description=_('Pay invoice'), |
121 | 121 |
long_description=_('not yet implemented'), |
122 | 122 |
example_pattern='{invoice_id}/pay/', |
passerelle/contrib/tcl/models.py | ||
---|---|---|
38 | 38 |
verbose_name = _('TCL') |
39 | 39 | |
40 | 40 |
@endpoint( |
41 |
pattern='^(?P<identifier>\w+)/?$', |
|
41 |
pattern=r'^(?P<identifier>\w+)/?$',
|
|
42 | 42 |
perm='can_access', |
43 | 43 |
description=_('Info about a stop'), |
44 | 44 |
example_pattern='{identifier}/', |
passerelle/contrib/teamnet_axel/models.py | ||
---|---|---|
239 | 239 |
payable_invoices.update(normalize_invoice(i.attrib, family_id)) |
240 | 240 |
return payable_invoices |
241 | 241 | |
242 |
@endpoint(name='regie', pattern='^(?P<regie_id>\w+)/invoices/$') |
|
242 |
@endpoint(name='regie', pattern=r'^(?P<regie_id>\w+)/invoices/$')
|
|
243 | 243 |
def active_invoices(self, request, regie_id, **kwargs): |
244 | 244 |
family_id = self.get_family_id(request) |
245 | 245 |
if not family_id: |
... | ... | |
266 | 266 |
historical_invoices.update(normalize_invoice(i.attrib, family_id, historical=True)) |
267 | 267 |
return historical_invoices |
268 | 268 | |
269 |
@endpoint(name='regie', perm='can_access', pattern='^(?P<regie_id>\w+)/invoices/history/$') |
|
269 |
@endpoint(name='regie', perm='can_access', pattern=r'^(?P<regie_id>\w+)/invoices/history/$')
|
|
270 | 270 |
def invoices_history(self, request, regie_id, **kwargs): |
271 | 271 |
family_id = self.get_family_id(request) |
272 | 272 |
if not family_id: |
... | ... | |
277 | 277 |
invoices = sorted(historical, key=lambda i: i['created'], reverse=True) |
278 | 278 |
return {'data': invoices} |
279 | 279 | |
280 |
@endpoint(name='regie', perm='can_access', pattern='^(?P<regie_id>\w+)/invoice/(?P<invoice_id>[\w,-]+)/$') |
|
280 |
@endpoint( |
|
281 |
name='regie', perm='can_access', pattern=r'^(?P<regie_id>\w+)/invoice/(?P<invoice_id>[\w,-]+)/$' |
|
282 |
) |
|
281 | 283 |
def get_invoice_details(self, request, regie_id, invoice_id, **kwargs): |
282 | 284 |
family_id, i = invoice_id.split('-', 1) |
283 | 285 |
payable = self.get_teamnet_payable_invoices(regie_id, family_id) |
... | ... | |
289 | 291 |
return {'data': None} |
290 | 292 | |
291 | 293 |
@endpoint( |
292 |
name='regie', perm='can_access', pattern='^(?P<regie_id>\w+)/invoice/(?P<invoice_id>[\w,-]+)/pdf/$' |
|
294 |
name='regie', perm='can_access', pattern=r'^(?P<regie_id>\w+)/invoice/(?P<invoice_id>[\w,-]+)/pdf/$'
|
|
293 | 295 |
) |
294 | 296 |
def invoice_pdf(self, request, regie_id, invoice_id, **kwargs): |
295 | 297 |
family_id, invoice = invoice_id.split('-', 1) |
... | ... | |
310 | 312 |
name='regie', |
311 | 313 |
methods=['post'], |
312 | 314 |
perm='can_access', |
313 |
pattern='^(?P<regie_id>\w+)/invoice/(?P<invoice_id>[\w,-]+)/pay/$', |
|
315 |
pattern=r'^(?P<regie_id>\w+)/invoice/(?P<invoice_id>[\w,-]+)/pay/$',
|
|
314 | 316 |
) |
315 | 317 |
def pay_invoice(self, request, regie_id, invoice_id, **kwargs): |
316 | 318 |
data = json_loads(request.body) |
317 |
- |