Skip to content

Commit 8520288

Browse files
committed
minor changes
1 parent 0908600 commit 8520288

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

fastmath.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ class FunctionCallVisitor(ast.NodeVisitor):
105105
Attributes
106106
----------
107107
module_names : list
108-
A list of module names to track the modules as the visitor traverses their AST.
108+
A list of module names to track the modules as the visitor traverses them.
109109
110110
call_stack : list
111111
A list of njit functions, representing a chain of function calls,
112112
where each element is a string of the form "module_name.func_name".
113113
114114
out : list
115-
A list of unique function `call_stack`s.
115+
A list of unique `call_stack`s.
116116
117117
njit_funcs : list
118118
A list of all njit functions in `pkg_dir`'s modules. Each element is a tuple
@@ -160,9 +160,9 @@ class FunctionCallVisitor(ast.NodeVisitor):
160160
unless it is already included in one of the so-far-collected call stacks.
161161
162162
visit_Call(node)
163-
Visit an AST node of type `ast.Call`. This method is called when the visitor
164-
encounters a function call in the AST. It checks if the called function is
165-
a njit function and, if so, traverses its AST to collect its call stack.
163+
This method is called when the visitor encounters a function call in the AST. It
164+
checks if the called function is a njit function and, if so, traverses its AST
165+
to collect its call stack.
166166
"""
167167

168168
def __init__(self, pkg_dir, pkg_name):
@@ -256,10 +256,10 @@ def push_call_stack(self, module_name, func_name):
256256
Parameters
257257
----------
258258
module_name : str
259-
The name of the module containing the function being called.
259+
A module's name
260260
261261
func_name : str
262-
The name of the function being called.
262+
A function's name
263263
264264
Returns
265265
-------
@@ -391,9 +391,7 @@ def visit_Call(self, node):
391391

392392
def get_njit_call_stacks(pkg_dir, pkg_name):
393393
"""
394-
Get the call stacks of all njit functions in `pkg_dir`.
395-
This function traverses the AST of each module in `pkg_dir`
396-
and returns a list of unique function call stacks.
394+
Get the call stacks of all njit functions in `pkg_dir`
397395
398396
Parameters
399397
----------

0 commit comments

Comments
 (0)