Skip to content

Commit

Permalink
Merge 02ed5ce into 0a6aff7
Browse files Browse the repository at this point in the history
  • Loading branch information
rharish101 committed Dec 30, 2020
2 parents 0a6aff7 + 02ed5ce commit 6ac2978
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions radon/tests/test_halstead.py
Expand Up @@ -74,6 +74,18 @@ def f():
''',
(2, 4, 2, 4),
),
(
'''
a = 2
b = 3
a *= b
async def f():
b = 2
b += 4
''',
(2, 4, 2, 4),
),
(
'''
a = b < 4
Expand Down
6 changes: 6 additions & 0 deletions radon/visitors.py
Expand Up @@ -445,3 +445,9 @@ def visit_FunctionDef(self, node):

# Save the visited function visitor for later reference.
self.function_visitors.append(func_visitor)

def visit_AsyncFunctionDef(self, node):
'''Async functions are similar to standard functions, so treat them as
such.
'''
self.visit_FunctionDef(node)

0 comments on commit 6ac2978

Please sign in to comment.