Logo
Explore Help
Sign In
mirrors/llvm-project
0
0
Fork 0
You've already forked llvm-project
mirror of https://github.com/llvm/llvm-project.git synced 2025-05-09 22:46:05 +00:00
Code Issues Projects Releases Wiki Activity
llvm-project/lldb/packages/Python/lldbsuite/support/funcutils.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
337 B
Python
Raw Normal View History

Move some of the common decorators to decorators.py. 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
2016-02-04 18:03:01 +00:00
import inspect
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
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 1766ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API