Skip to content

Commit

Permalink
Re #10137. Fixing python whitespace in Code/Tools tree
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Aug 20, 2014
1 parent 18121e8 commit 973b5d1
Show file tree
Hide file tree
Showing 13 changed files with 564 additions and 565 deletions.
10 changes: 5 additions & 5 deletions Code/Tools/DOI/doi.py
Expand Up @@ -97,7 +97,7 @@ def build_xml_form(doi, relationships, creator_name_list, version_str):
identifier.text = doi
identifier.set('identifierType', 'DOI')

# Creators are defined as "the main researchers involved in producing the
# Creators are defined as "the main researchers involved in producing the
# data, or the authors of the publication, in priority order". Allowed
# values are "a corporate/institutional or personal name".
#
Expand Down Expand Up @@ -384,7 +384,7 @@ def run(options):
creator_name_list = authors.authors_up_to_git_tag(tag)
# In the case of the main DOI we need to add the whitelisted names too.
creator_name_list = sorted(set(creator_name_list + authors.whitelist))

xml_form = build_xml_form(doi, {}, creator_name_list, None)

create_or_update_metadata(xml_form, server_url_base, doi, options)
Expand All @@ -401,7 +401,7 @@ def run(options):
relationships = { main_doi : 'IsPartOf' }
if has_previous_version:
relationships[prev_doi] = 'IsNewVersionOf'

creator_name_list = authors.authors_under_git_tag(tag)
xml_form = build_xml_form(
doi,
Expand All @@ -417,11 +417,11 @@ def run(options):
# Create/update the metadata and DOI of the previous version, if it
# was found to have a DOI.
if has_previous_version:
prev_relationships = {
prev_relationships = {
main_doi : 'IsPartOf',
doi : 'IsPreviousVersionOf'
}

prev_creator_name_list = authors.authors_under_git_tag(prev_tag)
prev_xml_form = build_xml_form(
prev_doi,
Expand Down
10 changes: 5 additions & 5 deletions Code/Tools/DefaultConfigFiles/configToCpp.py
Expand Up @@ -7,8 +7,8 @@

with open(sys.argv[2]) as f:
for line in f:
line = line.rstrip('\n')
if line == "":
print sys.argv[1] + " << std::endl;"
else:
print sys.argv[1] + " << \"" + line + "\" << std::endl;"
line = line.rstrip('\n')
if line == "":
print sys.argv[1] + " << std::endl;"
else:
print sys.argv[1] + " << \"" + line + "\" << std::endl;"
2 changes: 1 addition & 1 deletion Code/Tools/PeriodicTable/generate_atom_code.py
Expand Up @@ -96,7 +96,7 @@ def readExisting(filename):

# read in an existing file
(code_before, code_after) = readExisting(filename)

# setup the file for the elements and isotopes
print "writing information to %s" % filename
handle = open(filename, 'w')
Expand Down
6 changes: 3 additions & 3 deletions Code/Tools/Pylint/run_pylint.py
Expand Up @@ -144,7 +144,7 @@ def main(argv):
def parse_arguments(argv):
"""
Parse arguments for script input
Args:
argv (list): List of strings giving command line arguments
"""
Expand Down Expand Up @@ -227,7 +227,7 @@ def setup_mantidpath(mantidpath):
os.environ["MANTIDPATH"] = mantidpath
cur_pypath = os.environ.get("PYTHONPATH", "")
# for subprocesses
os.environ["PYTHONPATH"] = mantidpath + os.pathsep + cur_pypath
os.environ["PYTHONPATH"] = mantidpath + os.pathsep + cur_pypath
sys.path.insert(0, mantidpath) # for current process

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -272,7 +272,7 @@ def run_checks(targets, serializer, options):
Run pylint on the chosen targets
Args:
targets (list): A list of relative directory/file targets relative
targets (list): A list of relative directory/file targets relative
to options.basedir
serializer (file-like): An object with a write method that will receive
the output
Expand Down

0 comments on commit 973b5d1

Please sign in to comment.