Skip to content

Commit

Permalink
Rename aliases directive to alias
Browse files Browse the repository at this point in the history
Refs #9562
  • Loading branch information
martyngigg committed Jun 3, 2014
1 parent b9fe7a4 commit 53d50fb
Showing 1 changed file with 5 additions and 5 deletions.
@@ -1,24 +1,24 @@
from base import BaseDirective


class AliasesDirective(BaseDirective):
class AliasDirective(BaseDirective):

"""
Obtains the aliases for a given algorithm based on it's name.
Obtains the alias for a given algorithm based on it's name.
"""

required_arguments, optional_arguments = 0, 0

def run(self):
"""
Called by Sphinx when the ..aliases:: directive is encountered.
Called by Sphinx when the ..alias:: directive is encountered.
"""
alg = self.create_mantid_algorithm(self.algorithm_name(), self.algorithm_version())
alias = alg.alias()
if len(alias) == 0:
return []

self.add_rst(self.make_header("Aliases"))
self.add_rst(self.make_header("Alias"))
format_str = "This algorithm is also known as: **%s**"
self.add_rst(format_str % alias)
self.commit_rst()
Expand All @@ -32,4 +32,4 @@ def setup(app):
Args:
app: The main Sphinx application object
"""
app.add_directive('aliases', AliasesDirective)
app.add_directive('alias', AliasDirective)

0 comments on commit 53d50fb

Please sign in to comment.