Skip to content

Commit

Permalink
Replaced \ by \ in order to avoid DeprecationWarning or SyntaxWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemerle committed Sep 6, 2024
1 parent d4f1982 commit 227906f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/cloudnet/tosca/tosca_diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Software Name : Cloudnet TOSCA toolbox
# Version: 1.0
# SPDX-FileCopyrightText: Copyright (c) 2020-22 Orange
# SPDX-FileCopyrightText: Copyright (c) 2020-24 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0
Expand Down Expand Up @@ -185,7 +185,7 @@ def generation(self):
node_name,
": ",
short_type_name(node_type),
'|\l\l\l\l" shape=record style=rounded]',
'|\\l\\l\\l\\l" shape=record style=rounded]',
sep="",
)
for capability_name, capability_yaml in syntax.get_capabilities(
Expand Down
6 changes: 3 additions & 3 deletions bin/cloudnet/tosca/type_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Software Name : Cloudnet TOSCA toolbox
# Version: 1.0
# SPDX-FileCopyrightText: Copyright (c) 2020-22 Orange
# SPDX-FileCopyrightText: Copyright (c) 2020-24 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0
Expand Down Expand Up @@ -346,7 +346,7 @@ def array_to_string_with_or_separator(a_list):
return str(a_list).replace("['", "").replace("']", "").replace("', '", " or ")


SCALAR_UNIT_RE = re.compile("^([0-9]+(\.[0-9]+)?)( )*([A-Za-z]+)$")
SCALAR_UNIT_RE = re.compile("^([0-9]+(\\.[0-9]+)?)( )*([A-Za-z]+)$")


def split_scalar_unit(a_string, units):
Expand Down Expand Up @@ -380,7 +380,7 @@ def normalize_scalar_unit(a_string, units):
return scalar * units.get(unit)


VERSION_RE = re.compile("^([0-9]+)\.([0-9]+)(((\.[0-9]+)?)(\.[A-Za-z]+(\-[0-9]+)?)?)?$")
VERSION_RE = re.compile("^([0-9]+)\\.([0-9]+)(((\\.[0-9]+)?)(\\.[A-Za-z]+(\\-[0-9]+)?)?)?$")


def check_version(a_string):
Expand Down
4 changes: 2 additions & 2 deletions bin/cloudnet/tosca/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Software Name : Cloudnet TOSCA toolbox
# Version: 1.0
# SPDX-FileCopyrightText: Copyright (c) 2020 Orange
# SPDX-FileCopyrightText: Copyright (c) 2020-24 Orange
# SPDX-License-Identifier: Apache-2.0
#
# This software is distributed under the Apache License 2.0
Expand All @@ -15,7 +15,7 @@

import re

SCALAR_UNIT_RE = re.compile("^([0-9]+(\.[0-9]+)?)( )*([A-Za-z]+)$")
SCALAR_UNIT_RE = re.compile("^([0-9]+(\\.[0-9]+)?)( )*([A-Za-z]+)$")


def split_scalar_unit(scalar):
Expand Down

0 comments on commit 227906f

Please sign in to comment.