mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
Define the operations in the class, not in the function
I was originally going to try to automatically include these in the docstring using format, but they would have to be defined before the docstring for that to work. But I think it's still useful to have these defined in the class.
This commit is contained in:
9
sith.py
9
sith.py
@@ -87,12 +87,13 @@ class TestCase(object):
|
||||
dct = json.load(f)
|
||||
return cls(**dct)
|
||||
|
||||
operations = [
|
||||
'completions', 'goto_assignments', 'goto_definitions', 'usages',
|
||||
'call_signatures']
|
||||
|
||||
@classmethod
|
||||
def generate(cls, file_path):
|
||||
operations = [
|
||||
'completions', 'goto_assignments', 'goto_definitions', 'usages',
|
||||
'call_signatures']
|
||||
operation = random.choice(operations)
|
||||
operation = random.choice(cls.operations)
|
||||
|
||||
path = random.choice(SourceFinder.files(file_path))
|
||||
with open(path) as f:
|
||||
|
||||
Reference in New Issue
Block a user