Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant slash from a regex #496

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Feb 27, 2024

Fix #492
Follow-up after #473

@FrostyX
Copy link
Member Author

FrostyX commented Feb 27, 2024

The correct version that worked in the past was:

self.changelog_regex = re.compile('\\*\s%s\s%s(\s<%s>)?' % (self.today,
    self.git_user, git_email.replace("+", "\+").replace(".", "\.")))

@praiskup do you think the proposed change is equivalent to it?

@praiskup
Copy link
Member

In [6]: '\\*\s' == r'\*\s'
<>:1: SyntaxWarning: invalid escape sequence '\s'
<ipython-input-6-41f8209ec181>:1: SyntaxWarning: invalid escape sequence '\s'
  '\\*\s' == r'\*\s'
Out[6]: True

Seems equivalent.

@praiskup
Copy link
Member

I tested it fixes the issue. Thank you.

@praiskup praiskup merged commit e8de2e8 into rpm-software-management:master Feb 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No version in tito release %changelog
2 participants