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: use raw string for regex #15

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 ezodf/tableutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def iter_cell_range_without_start_pos(pos, size):
next(generator)
return generator

CELL_ADDRESS = re.compile('^([A-Z]+)(\d+)$')
CELL_ADDRESS = re.compile(r'^([A-Z]+)(\d+)$')

def address_to_index(address):
def column_name_to_index(colname):
Expand Down
2 changes: 1 addition & 1 deletion ezodf/timeparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
DATE_FORMAT = "%Y-%m-%d"

class TimeParser(object):
duration_matcher = re.compile("^P(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+(?:,\d+)?S)?)?$")
duration_matcher = re.compile(r"^P(\d+Y)?(\d+M)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+(?:,\d+)?S)?)?$")

def __init__(self, time):
if is_string(time):
Expand Down