Skip to content

Commit

Permalink
Fixed todo etc. labelled as note, python3 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacmackin committed Jul 26, 2016
1 parent f8f3967 commit aa3a985
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -14,4 +14,5 @@ media/
todo.md
venv/
#*#
.#*
.#*
venv3/
2 changes: 1 addition & 1 deletion ford/__init__.py
Expand Up @@ -47,7 +47,7 @@
__author__ = "Chris MacMackin, Jacob Williams, Marco Restelli, Iain Barrass, Jérémie Burgalat, Stephen J. Turnbull, Balint Aradi"
__credits__ = ["Stefano Zhagi", "Izaak Beekman", "Gavin Huttley"]
__license__ = "GPLv3"
__version__ = "5.0.1"
__version__ = "5.0.2"
__maintainer__ = "Chris MacMackin"
__status__ = "Production"

Expand Down
3 changes: 2 additions & 1 deletion ford/fixed2free2.py
Expand Up @@ -34,6 +34,7 @@
# TODO:
# *) Improve command line usage

from __future__ import print_function
import sys

class FortranLine:
Expand Down Expand Up @@ -130,7 +131,7 @@ def convertToFree(stream):
if len(sys.argv) > 1:
infile = open(sys.argv[1], 'r')
for line in convertToFree(infile):
print line,
print(line),

infile.close()
else:
Expand Down
6 changes: 3 additions & 3 deletions ford/sourceform.py
Expand Up @@ -713,14 +713,14 @@ def __init__(self,source,first_line,parent=None,inherited_permission=None,
if hasattr(self,'common'):
split = self.COMMON_SPLIT_RE.split(line)
if len(split) > 1:
for i in range(len(split)/2):
for i in range(len(split)//2):
pseudo_line = split[0] + ' ' + split[2*i+1] + ' ' + split[2*i+2].strip()
if pseudo_line[-1] == ',': pseudo_line = pseudo_line[:-1]
self.common.append(FortranCommon(source,
self.COMMON_RE.match(pseudo_line),self,
'public'))
for i in range(len(split)/2):
self.common[-i-1].doc = self.common[-len(split)/2+1].doc
for i in range(len(split)//2):
self.common[-i-1].doc = self.common[-len(split)//2+1].doc
else:
self.common.append(FortranCommon(source,
self.COMMON_RE.match(line),self,'public'))
Expand Down
5 changes: 3 additions & 2 deletions ford/utils.py
Expand Up @@ -45,8 +45,9 @@ def sub_notes(docs):
the corresponding div.
"""
def substitute(match):
ret = "</p><div class=\"alert alert-{}\" role=\"alert\"><h4>Note</h4>" \
"<p>{}</p></div>".format(NOTE_TYPE[match.group(1).lower()], match.group(2))
ret = "</p><div class=\"alert alert-{}\" role=\"alert\"><h4>{}</h4>" \
"<p>{}</p></div>".format(NOTE_TYPE[match.group(1).lower()],
match.group(1).capitalize(), match.group(2))
if len(match.groups()) >= 4 and not match.group(4): ret += '\n<p>'
return ret
for regex in NOTE_RE:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -12,13 +12,13 @@
name = 'FORD',
packages = ['ford'],
include_package_data = True,
version = '5.0.1',
version = '5.0.2',
description = 'FORD, standing for FORtran Documenter, is an automatic documentation generator for modern Fortran programs.',
long_description = long_description,
author = 'Chris MacMackin',
author_email = 'cmacmackin@gmail.com',
url = 'https://github.com/cmacmackin/ford/',
download_url = 'https://github.com/cmacmackin/ford/tarball/5.0.1',
download_url = 'https://github.com/cmacmackin/ford/tarball/5.0.2',
keywords = ['Markdown', 'Fortran', 'documentation', 'comments'],
classifiers=[
# How mature is this project? Common values are
Expand Down

0 comments on commit aa3a985

Please sign in to comment.