summaryrefslogtreecommitdiff
path: root/test/input/func_noerror_9215_lambda_arg_as_decorator.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/input/func_noerror_9215_lambda_arg_as_decorator.py')
-rw-r--r--test/input/func_noerror_9215_lambda_arg_as_decorator.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/input/func_noerror_9215_lambda_arg_as_decorator.py b/test/input/func_noerror_9215_lambda_arg_as_decorator.py
deleted file mode 100644
index cbbc747..0000000
--- a/test/input/func_noerror_9215_lambda_arg_as_decorator.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Demonstrate false undefined variable for lambda functions.
-
-http://www.logilab.org/ticket/9215
-"""
-
-__revision__ = None
-
-def decorator(expr):
- """Function returning decorator."""
- def func(function):
- """Pass-thru decorator."""
- return function
- # use expr
- expr(0)
- return func
-
-# this lambda is flagged
-# E0602: 16:main.<lambda>: Undefined variable 'x'
-@decorator(lambda x: x > 0)
-def main():
- """Dummy function."""
- # this one is not flagged
- decorator(lambda y: y > 0)
-
-if __name__ == "__main__":
- main()
-
-
-