Skip to content

Commit d93741a

Browse files
committed
Flake8 cleanup
1 parent c36a448 commit d93741a

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

mkdocs/utils/__init__.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def get_theme_names():
319319

320320

321321
def dirname_to_title(dirname):
322-
322+
""" Return a page tile obtained from a directory name. """
323323
title = dirname
324324
title = title.replace('-', ' ').replace('_', ' ')
325325
# Capitalize if the dirname was all lowercase, otherwise leave it as-is.
@@ -330,22 +330,22 @@ def dirname_to_title(dirname):
330330

331331

332332
def get_markdown_title(markdown_src):
333-
"""
334-
Get the title of a Markdown document. The title in this case is considered
335-
to be a H1 that occurs before any other content in the document.
336-
The procedure is then to iterate through the lines, stopping at the first
337-
non-whitespace content. If it is a title, return that, otherwise return
338-
None.
339-
"""
333+
"""
334+
Get the title of a Markdown document. The title in this case is considered
335+
to be a H1 that occurs before any other content in the document.
336+
The procedure is then to iterate through the lines, stopping at the first
337+
non-whitespace content. If it is a title, return that, otherwise return
338+
None.
339+
"""
340340

341-
lines = markdown_src.replace('\r\n', '\n').replace('\r', '\n').split('\n')
342-
while lines:
343-
line = lines.pop(0).strip()
344-
if not line.strip():
345-
continue
346-
if not line.startswith('# '):
347-
return
348-
return line.lstrip('# ')
341+
lines = markdown_src.replace('\r\n', '\n').replace('\r', '\n').split('\n')
342+
while lines:
343+
line = lines.pop(0).strip()
344+
if not line.strip():
345+
continue
346+
if not line.startswith('# '):
347+
return
348+
return line.lstrip('# ')
349349

350350

351351
def find_or_create_node(branch, key):

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ commands=
1818
[testenv:flake8]
1919
basepython = python2.7
2020
deps=-rrequirements/test.txt
21-
commands={envbindir}/flake8 mkdocs --max-line-length=119 --exclude=mkdocs/compat.py
21+
commands={envbindir}/flake8 mkdocs --max-line-length=119
2222

2323
[testenv:markdown-lint]
2424
whitelist_externals = markdownlint

0 commit comments

Comments
 (0)