Skip to content
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
6 changes: 3 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# JP: added from sphinxdocs
autosummary_generate = False

if any(re.match("\s*api\s*", l) for l in index_rst_lines):
if any(re.match(r"\s*api\s*", l) for l in index_rst_lines):
autosummary_generate = True

# numpydoc
Expand Down Expand Up @@ -341,8 +341,8 @@
# file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'pandas.tex',
u'pandas: powerful Python data analysis toolkit',
u'Wes McKinney\n\& PyData Development Team', 'manual'),
'pandas: powerful Python data analysis toolkit',
r'Wes McKinney\n\& PyData Development Team', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
6 changes: 3 additions & 3 deletions scripts/find_commits_touching_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
argparser.add_argument('funcname', metavar='FUNCNAME',
help='Name of function/method to search for changes on')
argparser.add_argument('-f', '--file-masks', metavar='f_re(,f_re)*',
default=["\.py.?$"],
default=[r"\.py.?$"],
help='comma separated list of regexes to match '
'filenames against\ndefaults all .py? files')
argparser.add_argument('-d', '--dir-masks', metavar='d_re(,d_re)*',
Expand Down Expand Up @@ -80,7 +80,7 @@ def get_hits(defname, files=()):
try:
r = sh.git('blame',
'-L',
'/def\s*{start}/,/def/'.format(start=defname),
r'/def\s*{start}/,/def/'.format(start=defname),
f,
_tty_out=False)
except sh.ErrorReturnCode_128:
Expand All @@ -89,7 +89,7 @@ def get_hits(defname, files=()):

lines = r.strip().splitlines()[:-1]
# remove comment lines
lines = [x for x in lines if not re.search("^\w+\s*\(.+\)\s*#", x)]
lines = [x for x in lines if not re.search(r"^\w+\s*\(.+\)\s*#", x)]
hits = set(map(lambda x: x.split(" ")[0], lines))
cs.update({Hit(commit=c, path=f) for c in hits})

Expand Down
6 changes: 3 additions & 3 deletions scripts/find_undoc_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def build_loc(f):
sig_names = set(inspect.getargspec(f).args)
# XXX numpydoc can be used to get the list of parameters
doc = f.__doc__.lower()
doc = re.split('^\s*parameters\s*', doc, 1, re.M)[-1]
doc = re.split('^\s*returns*', doc, 1, re.M)[0]
doc = re.split(r'^\s*parameters\s*', doc, 1, re.M)[-1]
doc = re.split(r'^\s*returns*', doc, 1, re.M)[0]
doc_names = {x.split(":")[0].strip() for x in doc.split('\n')
if re.match('\s+[\w_]+\s*:', x)}
if re.match(r'\s+[\w_]+\s*:', x)}
sig_names.discard('self')
doc_names.discard('kwds')
doc_names.discard('kwargs')
Expand Down