diff options
author | Georg Brandl <georg@python.org> | 2015-03-08 16:55:34 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2015-03-08 16:55:34 +0100 |
commit | d0efb42a4179f331dd67d4d301c81b2c01d8e386 (patch) | |
tree | 172f81f7d18e2e6fb28c0ead629e10a8443ec6ee /sphinx/util/osutil.py | |
parent | 2a6b9d58088a186884884d8f30542df8963de075 (diff) | |
download | sphinx-git-d0efb42a4179f331dd67d4d301c81b2c01d8e386.tar.gz |
util: pep8 fixes
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r-- | sphinx/util/osutil.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 0645ee46f..46f908292 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -36,6 +36,7 @@ EINVAL = getattr(errno, 'EINVAL', 0) # hangover from more *nix-oriented origins. SEP = "/" + def os_path(canonicalpath): return canonicalpath.replace(SEP, path.sep) @@ -59,7 +60,7 @@ def relative_uri(base, to): if len(b2) == 1 and t2 == ['']: # Special case: relative_uri('f/index.html','f/') should # return './', not '' - return '.' + SEP + return '.' + SEP return ('..' + SEP) * (len(b2)-1) + SEP.join(t2) @@ -147,6 +148,7 @@ def copyfile(source, dest): no_fn_re = re.compile(r'[^a-zA-Z0-9_-]') + def make_filename(string): return no_fn_re.sub('', string) or 'sphinx' @@ -167,6 +169,7 @@ def safe_relpath(path, start=None): except ValueError: return path + def find_catalog(docname, compaction): if compaction: ret = docname.split(SEP, 1)[0] |