Skip to content

Commit

Permalink
Merge fix get_classes_from_file #46454
Browse files Browse the repository at this point in the history
  • Loading branch information
jason810496 authored and potiuk committed Feb 6, 2025
1 parent 80225d9 commit 2e95cfd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/always/test_project_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ def list_of_classes(self):
for operator_file in self.new_class_paths():
operators_paths = self.get_classes_from_file(operator_file, NEW_PROVIDER_SRC, is_new=True)
classes.update(operators_paths)
# replace src. prefix with empty string for all classes
classes = {k.strip("src."): v for k, v in classes.items()}
return classes

def get_classes_from_file(
Expand All @@ -268,7 +266,8 @@ def get_classes_from_file(
continue

if is_new:
results[f"{'.'.join(module.split('.')[2:])}.{current_node.name}"] = current_node
module_path = module[module.find("airflow.providers") :]
results[f"{module_path}.{current_node.name}"] = current_node
else:
results[f"{module}.{current_node.name}"] = current_node
print(f"{results}")
Expand Down

0 comments on commit 2e95cfd

Please sign in to comment.