Skip to content

Commit

Permalink
Refactor code to remove unnecessary method source code retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-Ryujin committed Dec 10, 2023
1 parent 1a74337 commit b815293
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,4 @@ def get_code_for_perturbation():
# Get the source code of the class
class_source = inspect.getsource(obj)
class_sources.append(class_source)

# Additionally, get source code of each method in the class
methods = inspect.getmembers(obj, predicate=inspect.isfunction)
for method_name, method_obj in methods:
method_source = inspect.getsource(method_obj)
class_sources.append(method_source)
return class_sources

0 comments on commit b815293

Please sign in to comment.