Fix deprecation warnings due to invalid escape sequences. (#3273)
* Fix deprecation warnings due to invalid escape sequences. * Fix linter error.
This commit is contained in:
parent
c321ad46b0
commit
7054143701
13 changed files with 35 additions and 35 deletions
|
|
@ -15,9 +15,9 @@ url_paths = {
|
|||
"{0}/restapis/(?P<function_id>[^/]+)/deployments/(?P<deployment_id>[^/]+)/?$": APIGatewayResponse().individual_deployment,
|
||||
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/?$": APIGatewayResponse().resource_individual,
|
||||
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/?$": APIGatewayResponse().resource_methods,
|
||||
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/responses/(?P<status_code>\d+)$": APIGatewayResponse().resource_method_responses,
|
||||
r"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/responses/(?P<status_code>\d+)$": APIGatewayResponse().resource_method_responses,
|
||||
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/integration/?$": APIGatewayResponse().integrations,
|
||||
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/integration/responses/(?P<status_code>\d+)/?$": APIGatewayResponse().integration_responses,
|
||||
r"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/integration/responses/(?P<status_code>\d+)/?$": APIGatewayResponse().integration_responses,
|
||||
"{0}/apikeys$": APIGatewayResponse().apikeys,
|
||||
"{0}/apikeys/(?P<apikey>[^/]+)": APIGatewayResponse().apikey_individual,
|
||||
"{0}/usageplans$": APIGatewayResponse().usage_plans,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import unicode_literals
|
||||
from .responses import Ec2InstanceConnectResponse
|
||||
|
||||
url_bases = ["https?://ec2-instance-connect\.(.+)\.amazonaws\.com"]
|
||||
url_bases = [r"https?://ec2-instance-connect\.(.+)\.amazonaws\.com"]
|
||||
|
||||
url_paths = {"{0}/$": Ec2InstanceConnectResponse.dispatch}
|
||||
|
|
|
|||
|
|
@ -183,9 +183,9 @@ class EventsHandler(BaseResponse):
|
|||
|
||||
if sched_exp:
|
||||
if not (
|
||||
re.match("^cron\(.*\)", sched_exp)
|
||||
re.match(r"^cron\(.*\)", sched_exp)
|
||||
or re.match(
|
||||
"^rate\(\d*\s(minute|minutes|hour|hours|day|days)\)", sched_exp
|
||||
r"^rate\(\d*\s(minute|minutes|hour|hours|day|days)\)", sched_exp
|
||||
)
|
||||
):
|
||||
return self.error(
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ def region_from_managedblckchain_url(url):
|
|||
|
||||
|
||||
def networkid_from_managedblockchain_url(full_url):
|
||||
id_search = re.search("\/n-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
id_search = re.search(r"\/n-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
return_id = None
|
||||
if id_search:
|
||||
return_id = id_search.group(0).replace("/", "")
|
||||
|
|
@ -28,7 +28,7 @@ def get_network_id():
|
|||
|
||||
|
||||
def memberid_from_managedblockchain_url(full_url):
|
||||
id_search = re.search("\/m-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
id_search = re.search(r"\/m-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
return_id = None
|
||||
if id_search:
|
||||
return_id = id_search.group(0).replace("/", "")
|
||||
|
|
@ -42,7 +42,7 @@ def get_member_id():
|
|||
|
||||
|
||||
def proposalid_from_managedblockchain_url(full_url):
|
||||
id_search = re.search("\/p-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
id_search = re.search(r"\/p-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
return_id = None
|
||||
if id_search:
|
||||
return_id = id_search.group(0).replace("/", "")
|
||||
|
|
@ -56,7 +56,7 @@ def get_proposal_id():
|
|||
|
||||
|
||||
def invitationid_from_managedblockchain_url(full_url):
|
||||
id_search = re.search("\/in-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
id_search = re.search(r"\/in-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
return_id = None
|
||||
if id_search:
|
||||
return_id = id_search.group(0).replace("/", "")
|
||||
|
|
@ -107,7 +107,7 @@ def admin_password_ok(password):
|
|||
|
||||
|
||||
def nodeid_from_managedblockchain_url(full_url):
|
||||
id_search = re.search("\/nd-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
id_search = re.search(r"\/nd-[A-Z0-9]{26}", full_url, re.IGNORECASE)
|
||||
return_id = None
|
||||
if id_search:
|
||||
return_id = id_search.group(0).replace("/", "")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import unicode_literals
|
||||
from .responses import RDSResponse
|
||||
|
||||
url_bases = ["https?://rds(\..+)?.amazonaws.com"]
|
||||
url_bases = [r"https?://rds(\..+)?.amazonaws.com"]
|
||||
|
||||
url_paths = {"{0}/$": RDSResponse.dispatch}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ def tag_response2(*args, **kwargs):
|
|||
|
||||
|
||||
url_paths = {
|
||||
"{0}/(?P<api_version>[\d_-]+)/hostedzone$": Route53().list_or_create_hostzone_response,
|
||||
"{0}/(?P<api_version>[\d_-]+)/hostedzone/(?P<zone_id>[^/]+)$": Route53().get_or_delete_hostzone_response,
|
||||
"{0}/(?P<api_version>[\d_-]+)/hostedzone/(?P<zone_id>[^/]+)/rrset/?$": Route53().rrset_response,
|
||||
"{0}/(?P<api_version>[\d_-]+)/hostedzonesbyname": Route53().list_hosted_zones_by_name_response,
|
||||
"{0}/(?P<api_version>[\d_-]+)/healthcheck": Route53().health_check_response,
|
||||
"{0}/(?P<api_version>[\d_-]+)/tags/healthcheck/(?P<zone_id>[^/]+)$": tag_response1,
|
||||
"{0}/(?P<api_version>[\d_-]+)/tags/hostedzone/(?P<zone_id>[^/]+)$": tag_response2,
|
||||
"{0}/(?P<api_version>[\d_-]+)/trafficpolicyinstances/*": Route53().not_implemented_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzone$": Route53().list_or_create_hostzone_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzone/(?P<zone_id>[^/]+)$": Route53().get_or_delete_hostzone_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzone/(?P<zone_id>[^/]+)/rrset/?$": Route53().rrset_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/hostedzonesbyname": Route53().list_hosted_zones_by_name_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/healthcheck": Route53().health_check_response,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/tags/healthcheck/(?P<zone_id>[^/]+)$": tag_response1,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/tags/hostedzone/(?P<zone_id>[^/]+)$": tag_response2,
|
||||
r"{0}/(?P<api_version>[\d_-]+)/trafficpolicyinstances/*": Route53().not_implemented_response,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ dispatch = SQSResponse().dispatch
|
|||
|
||||
url_paths = {
|
||||
"{0}/$": dispatch,
|
||||
"{0}/(?P<account_id>\d+)/(?P<queue_name>[a-zA-Z0-9\-_\.]+)": dispatch,
|
||||
r"{0}/(?P<account_id>\d+)/(?P<queue_name>[a-zA-Z0-9\-_\.]+)": dispatch,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue