Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

fixed anomalous backslash in string #32

Merged
merged 1 commit into from
Mar 20, 2019
Merged
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 03-dict-set/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import re

WORD_RE = re.compile('\w+')
WORD_RE = re.compile(r'\w+')

index = {}
with open(sys.argv[1], encoding='utf-8') as fp:
Expand Down
2 changes: 1 addition & 1 deletion 03-dict-set/index0.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import re

WORD_RE = re.compile('\w+')
WORD_RE = re.compile(r'\w+')

index = {}
with open(sys.argv[1], encoding='utf-8') as fp:
Expand Down
2 changes: 1 addition & 1 deletion 03-dict-set/index_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import re
import collections

WORD_RE = re.compile('\w+')
WORD_RE = re.compile(r'\w+')

index = collections.defaultdict(list) # <1>
with open(sys.argv[1], encoding='utf-8') as fp:
Expand Down
2 changes: 1 addition & 1 deletion 14-it-generator/sentence.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import reprlib

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')


class Sentence:
Expand Down
2 changes: 1 addition & 1 deletion 14-it-generator/sentence_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import reprlib

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')


class Sentence:
Expand Down
2 changes: 1 addition & 1 deletion 14-it-generator/sentence_gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import reprlib

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')


class Sentence:
Expand Down
2 changes: 1 addition & 1 deletion 14-it-generator/sentence_genexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
import reprlib

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')


class Sentence:
Expand Down
2 changes: 1 addition & 1 deletion 14-it-generator/sentence_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import re
import reprlib

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')


class Sentence:
Expand Down
2 changes: 1 addition & 1 deletion 14-it-generator/sentence_iter2.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import re
import reprlib

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')


class Sentence:
Expand Down
4 changes: 2 additions & 2 deletions 18-asyncio-py3.7/charfinder/charfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
import functools
from collections import namedtuple

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')
RE_UNICODE_NAME = re.compile('^[A-Z0-9 -]+$')
RE_CODEPOINT = re.compile('U\+([0-9A-F]{4,6})')
RE_CODEPOINT = re.compile(r'U\+([0-9A-F]{4,6})')

INDEX_NAME = 'charfinder_index.pickle'
MINIMUM_SAVE_LEN = 10000
Expand Down
2 changes: 1 addition & 1 deletion 18-asyncio/charfinder/charfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import functools
from collections import namedtuple

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')
RE_UNICODE_NAME = re.compile('^[A-Z0-9 -]+$')
RE_CODEPOINT = re.compile('U\+([0-9A-F]{4,6})')

Expand Down
4 changes: 2 additions & 2 deletions attic/concurrency/charfinder/charfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
import itertools
from collections import namedtuple

RE_WORD = re.compile('\w+')
RE_WORD = re.compile(r'\w+')
RE_UNICODE_NAME = re.compile('^[A-Z0-9 -]+$')
RE_CODEPOINT = re.compile('U\+([0-9A-F]{4,6})')
RE_CODEPOINT = re.compile(r'U\+([0-9A-F]{4,6})')

INDEX_NAME = 'charfinder_index.pickle'
MINIMUM_SAVE_LEN = 10000
Expand Down
2 changes: 1 addition & 1 deletion attic/dicts/index_alex.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import re

NONWORD_RE = re.compile('\W+')
NONWORD_RE = re.compile(r'\W+')

idx = {}
with open(sys.argv[1], encoding='utf-8') as fp:
Expand Down
4 changes: 2 additions & 2 deletions attic/sequences/sentence_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import reprlib


RE_TOKEN = re.compile('\w+|\s+|[^\w\s]+')
RE_TOKEN = re.compile(r'\w+|\s+|[^\w\s]+')
RE_WORD = re.compile('\w+')
RE_PUNCTUATION = re.compile('[^\w\s]+')
RE_PUNCTUATION = re.compile(r'[^\w\s]+')


class SentenceSlice:
Expand Down