mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-10 13:36:09 +00:00

This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
17 lines
378 B
Python
17 lines
378 B
Python
from __future__ import print_function
|
|
from __future__ import absolute_import
|
|
|
|
# System modules
|
|
import inspect
|
|
|
|
# Third-party modules
|
|
|
|
# LLDB modules
|
|
|
|
def requires_self(func):
|
|
func_argc = len(inspect.getargspec(func).args)
|
|
if func_argc == 0 or (getattr(func,'im_self', None) is not None) or (hasattr(func, '__self__')):
|
|
return False
|
|
else:
|
|
return True
|