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

Fix deprecation warning regarding invalid escape sequences. #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pretty_bad_protocol/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
from ._parsers import _sanitise_list
from ._util import log

_VERSION_RE = re.compile('^\d+\.\d+\.\d+$')
_VERSION_RE = re.compile(r'^\d+\.\d+\.\d+$')


class GPGMeta(type):
Expand Down
2 changes: 1 addition & 1 deletion pretty_bad_protocol/_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def __init__(self, expiration_time, passphrase=None):

def _clean_key_expiration_option(self):
"""validates the expiration option supplied"""
allowed_entry = re.findall('^(\d+)(|w|m|y)$', self._expiration_time)
allowed_entry = re.findall(r'^(\d+)(|w|m|y)$', self._expiration_time)
if not allowed_entry:
raise UsageError("Key expiration option: %s is not valid" % self._expiration_time)

Expand Down
2 changes: 1 addition & 1 deletion pretty_bad_protocol/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
log = _logger.create_logger(0)

#: Compiled regex for determining a GnuPG binary's version:
_VERSION_STRING_REGEX = re.compile('(\d)(\.)(\d)(\.)(\d+)')
_VERSION_STRING_REGEX = re.compile(r'(\d)(\.)(\d)(\.)(\d+)')


class GnuPGVersionError(ValueError):
Expand Down