Skip to content

Commit

Permalink
Switch to a raw string for the prepare_release cli. (#362)
Browse files Browse the repository at this point in the history
Otherwise, when running against Python 3.12, we see warnings
like SyntaxWarning: invalid escape sequence '\.'

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Mar 8, 2024
1 parent 74d072f commit d6bf50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/catkin_pkg/cli/prepare_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def _main():
parser.add_argument('-y', '--non-interactive', action='store_true', default=False, help="Run without user interaction, confirming all questions with 'yes'")
args = parser.parse_args()

if args.version and not re.match('^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$', args.version):
if args.version and not re.match(r'^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$', args.version):
parser.error('The passed version must follow the conventions (positive integers x.y.z with no leading zeros)')

if args.tag_prefix and ' ' in args.tag_prefix:
Expand Down

0 comments on commit d6bf50f

Please sign in to comment.