mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00

## Summary Resolves #15522. ## Test Plan `cargo nextest run` and `cargo insta test`. --------- Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
17 lines
258 B
Python
17 lines
258 B
Python
import os
|
|
|
|
print(eval("1+1")) # S307
|
|
print(eval("os.getcwd()")) # S307
|
|
|
|
|
|
class Class(object):
|
|
def eval(self):
|
|
print("hi")
|
|
|
|
def foo(self):
|
|
self.eval() # OK
|
|
|
|
|
|
# https://github.com/astral-sh/ruff/issues/15522
|
|
map(eval, [])
|
|
foo = eval
|