ajouter le hook double-quote-string-fixer (#79788) #2

Merged
vdeniaud merged 3 commits from wip/79788-single-quotes into main 2023-08-16 11:55:25 +02:00
3 changed files with 13 additions and 7 deletions

View File

@ -1,2 +1,4 @@
# trivial: apply pre-commit hooks
eace7885ba28063010d1f41b42a2b26b9d5c5345
# misc: apply double-quote-string-fixer (#79788)
f0a7a8a98eef15331ae9835715798efd08ab2d01

View File

@ -1,6 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: double-quote-string-fixer
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:

View File

@ -120,13 +120,13 @@ class GrandlyonIodas(BaseResource):
for tache in etape['taches']['tache']:
if (
tache['idtypetache'] == 2
and datetime.strptime(tache['datearret'], "%d/%m/%Y") > datetime.now()
and datetime.strptime(tache['datearret'], '%d/%m/%Y') > datetime.now()
):
for nb in [3, 6]:
deltafindroit = (
nb
if (
datetime.strptime(tache['datearret'], "%d/%m/%Y")
datetime.strptime(tache['datearret'], '%d/%m/%Y')
- dateutil.relativedelta.relativedelta(months=nb)
)
== datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
@ -134,11 +134,11 @@ class GrandlyonIodas(BaseResource):
)
droits.append(
{
"libl": tache['produit']['libl'],
"dateproposition": tache['dateproposition'],
"datearret": tache['datearret'],
"dateeffet": tache['dateeffet'],
"deltafindroit": deltafindroit,
'libl': tache['produit']['libl'],
'dateproposition': tache['dateproposition'],
'datearret': tache['datearret'],
'dateeffet': tache['dateeffet'],
'deltafindroit': deltafindroit,
}
)