From 8eeea16aae673352a78b9741901d395e06cd3f2e Mon Sep 17 00:00:00 2001 From: SebF Date: Thu, 21 Oct 2021 22:06:01 +0200 Subject: [PATCH] =?UTF-8?q?factorisation=20de=20la=20requ=C3=AAte=20statio?= =?UTF-8?q?nnement=20non=20public?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osm_vc63/requetes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/osm_vc63/requetes.py b/osm_vc63/requetes.py index ce29245..c682864 100644 --- a/osm_vc63/requetes.py +++ b/osm_vc63/requetes.py @@ -73,20 +73,21 @@ CHAMPS_ADRESSE = { "api_adresse:properties:street": {"export_json": "Non", "FR": "rue_etalab"}, } +# pylint: disable=C0301 +STATIONNEMENT_NON_PUBLIC_REQ = r'nwr["amenity"="bicycle_parking"]["access"~"(no|permit|private|customers|permissive)"](area:aire_de_recherche);' REQS.append( Requete( - "stationnements_velos_publics", - # pylint: disable=C0301 - r'nwr["amenity"="bicycle_parking"](area:aire_de_recherche); - nwr["amenity"="bicycle_parking"]["access"~"(no|permit|private|customers|permissive)"](area:aire_de_recherche);', + "stationnements_velos_non_publics", + STATIONNEMENT_NON_PUBLIC_REQ, dict(CHAMPS_STATIONNEMENT, **CHAMPS_ADRESSE), ) ) REQS.append( Requete( - "stationnements_velos_non_publics", + "stationnements_velos_publics", # pylint: disable=C0301 - r'nwr["amenity"="bicycle_parking"]["access"~"(no|permit|private|customers|permissive)"](area:aire_de_recherche);', + rf'nwr["amenity"="bicycle_parking"](area:aire_de_recherche); - {STATIONNEMENT_NON_PUBLIC_REQ}', dict(CHAMPS_STATIONNEMENT, **CHAMPS_ADRESSE), ) )