33# Distributed under the Boost Software License, Version 1.0.
44# See http://www.boost.org/LICENSE_1_0.txt
55
6- """implements few "find" algorithms on declarations tree"""
6+ """Implements few "find" algorithms on declarations tree"""
77
88import types
99from . import algorithm
1010
1111
1212class matcher :
1313
14- """class -namespace, contains implementation of few "find" algorithms and
14+ """Class -namespace, contains implementation of few "find" algorithms and
1515 definition of related exception classes"""
1616
1717 class declaration_not_found_t (RuntimeError ):
1818
19- """exception , that will be raised, if the declaration could not be
19+ """Exception , that will be raised, if the declaration could not be
2020 found"""
2121
2222 def __init__ (self , matcher ):
@@ -31,7 +31,7 @@ def __str__(self):
3131
3232 class multiple_declarations_found_t (RuntimeError ):
3333
34- """exception , that will be raised, if more than one declaration was
34+ """Exception , that will be raised, if more than one declaration was
3535 found"""
3636
3737 def __init__ (self , matcher ):
@@ -47,15 +47,15 @@ def __str__(self):
4747 @staticmethod
4848 def find (decl_matcher , decls , recursive = True ):
4949 """
50- returns a list of declarations that match `decl_matcher` defined
50+ Returns a list of declarations that match `decl_matcher` defined
5151 criteria or None
5252
5353 :param decl_matcher: Python callable object, that takes one argument -
54- reference to a declaration
54+ reference to a declaration
5555 :param decls: the search scope, :class:declaration_t object or
56- :class:declaration_t objects list t
56+ :class:declaration_t objects list t
5757 :param recursive: boolean, if True, the method will run `decl_matcher`
58- on the internal declarations too
58+ on the internal declarations too
5959 """
6060
6161 where = []
@@ -70,17 +70,17 @@ def find(decl_matcher, decls, recursive=True):
7070 @staticmethod
7171 def find_single (decl_matcher , decls , recursive = True ):
7272 """
73- returns a reference to the declaration, that match `decl_matcher`
73+ Returns a reference to the declaration, that match `decl_matcher`
7474 defined criteria.
7575
7676 if a unique declaration could not be found the method will return None.
7777
7878 :param decl_matcher: Python callable object, that takes one argument -
79- reference to a declaration
79+ reference to a declaration
8080 :param decls: the search scope, :class:declaration_t object or
81- :class:declaration_t objects list t
81+ :class:declaration_t objects list t
8282 :param recursive: boolean, if True, the method will run `decl_matcher`
83- on the internal declarations too
83+ on the internal declarations too
8484 """
8585 answer = matcher .find (decl_matcher , decls , recursive )
8686 if len (answer ) == 1 :
@@ -89,18 +89,18 @@ def find_single(decl_matcher, decls, recursive=True):
8989 @staticmethod
9090 def get_single (decl_matcher , decls , recursive = True ):
9191 """
92- returns a reference to declaration, that match `decl_matcher` defined
92+ Returns a reference to declaration, that match `decl_matcher` defined
9393 criteria.
9494
9595 If a unique declaration could not be found, an appropriate exception
9696 will be raised.
9797
9898 :param decl_matcher: Python callable object, that takes one argument -
99- reference to a declaration
99+ reference to a declaration
100100 :param decls: the search scope, :class:declaration_t object or
101- :class:declaration_t objects list t
101+ :class:declaration_t objects list t
102102 :param recursive: boolean, if True, the method will run `decl_matcher`
103- on the internal declarations too
103+ on the internal declarations too
104104 """
105105 answer = matcher .find (decl_matcher , decls , recursive )
106106 if len (answer ) == 1 :
0 commit comments