Skip to content

Commit

Permalink
formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Jul 23, 2024
1 parent deb6498 commit 5aefa2d
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/oaklib/utilities/writers/change_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def handle_generic_change(
rows = list({row_format.format(change=change) for change in value})
self.write_markdown_table(f"{title}: {len(rows)}", header, rows)

def handle_new_synonym(self, value:List[Change]):
def handle_new_synonym(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -43,7 +43,7 @@ def handle_new_synonym(self, value:List[Change]):
# Write the "New Synonyms Added" section as a collapsible markdown table
self.write_markdown_table(f"Synonyms added: {len(rows)}", header, rows)

def handle_edge_deletion(self, value:List[Change]):
def handle_edge_deletion(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -59,7 +59,7 @@ def handle_edge_deletion(self, value:List[Change]):
# Write the "Edges Deleted" section as a collapsible markdown table
self.write_markdown_table(f"Relationships removed: {len(rows)}", header, rows)

def handle_edge_creation(self, value:List[Change]):
def handle_edge_creation(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -75,7 +75,7 @@ def handle_edge_creation(self, value:List[Change]):
# Write the "Edges Created" section as a collapsible markdown table
self.write_markdown_table(f"Relationships added: {len(rows)}", header, rows)

def handle_edge_change(self, value:List[Change]):
def handle_edge_change(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -92,7 +92,7 @@ def handle_edge_change(self, value:List[Change]):
# Write the "Edges Changed" section as a collapsible markdown table
self.write_markdown_table(f"Relationships changed: {len(rows)}", header, rows)

def handle_node_move(self, value:List[Change]):
def handle_node_move(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -109,7 +109,7 @@ def handle_node_move(self, value:List[Change]):
# Write the "Nodes Moved" section as a collapsible markdown table
self.write_markdown_table(f"Relationships added: {len(rows)}", header, rows)

def handle_predicate_change(self, value:List[Change]):
def handle_predicate_change(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -127,7 +127,7 @@ def handle_predicate_change(self, value:List[Change]):
# Write the "Predicate Changed" section as a collapsible markdown table
self.write_markdown_table(f"Predicates changed: {len(rows)}", header, rows)

def handle_node_rename(self, value:List[Change]):
def handle_node_rename(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -142,7 +142,7 @@ def handle_node_rename(self, value:List[Change]):
# Write the "Node Renamed" section as a collapsible markdown table
self.write_markdown_table(f"Nodes renamed: {len(rows)}", header, rows)

def handle_remove_synonym(self, value:List[Change]):
def handle_remove_synonym(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -157,7 +157,7 @@ def handle_remove_synonym(self, value:List[Change]):
# Write the "Synonyms Removed" section as a collapsible markdown table
self.write_markdown_table(f"Synonyms removed: {len(rows)}", header, rows)

def hand_synonym_predicate_change(self, value:List[Change]):
def hand_synonym_predicate_change(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -173,7 +173,7 @@ def hand_synonym_predicate_change(self, value:List[Change]):
# Write the "Synonym Predicate Changed" section as a markdown table
self.write_markdown_table(f"Synonym predicates changed: {len(rows)}", header, rows)

def handle_node_text_definition_change(self, value:List[Change]):
def handle_node_text_definition_change(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -189,7 +189,7 @@ def handle_node_text_definition_change(self, value:List[Change]):
# Write the "Node Text Definition Changed" section as a markdown table
self.write_markdown_table(f"Text definitions changed: {len(rows)}", header, rows)

def handle_node_text_definition(self, value:List[Change]):
def handle_node_text_definition(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -205,7 +205,7 @@ def handle_node_text_definition(self, value:List[Change]):
# Write the "Node Text Definition Added" section as a markdown table
self.write_markdown_table(f"Text definitions added: {len(rows)}", header, rows)

def handle_node_unobsoletion(self, value:List[Change]):
def handle_node_unobsoletion(self, value: List[Change]):
# Create rows for the table
rows = list({f"| {self._format_entity_labels(change.about_node)} |" for change in value})

Expand All @@ -215,7 +215,7 @@ def handle_node_unobsoletion(self, value:List[Change]):
# Write the "Node Unobsoleted" section as a markdown table
self.write_markdown_table(f"Nodes unobsoleted: {len(rows)}", header, rows)

def handle_node_creation(self, value:List[Change]):
def handle_node_creation(self, value: List[Change]):
# Create rows for the table
rows = list({f"| {self._format_entity_labels(change.about_node)} |" for change in value})

Expand All @@ -225,7 +225,7 @@ def handle_node_creation(self, value:List[Change]):
# Write the "Node Created" section as a markdown table
self.write_markdown_table(f"Other nodes added: {len(rows)}", header, rows)

def handle_class_creation(self, value:List[Change]):
def handle_class_creation(self, value: List[Change]):
# Create rows for the table
rows = list({f"| {self._format_entity_labels(change.about_node)} |" for change in value})

Expand All @@ -235,7 +235,7 @@ def handle_class_creation(self, value:List[Change]):
# Write the "Class Created" section as a markdown table
self.write_markdown_table(f"Classes added: {len(rows)}", header, rows)

def handle_node_deletion(self, value:List[Change]):
def handle_node_deletion(self, value: List[Change]):
# Create rows for the table
rows = list({f"| {self._format_entity_labels(change.about_node)} |" for change in value})

Expand All @@ -245,7 +245,7 @@ def handle_node_deletion(self, value:List[Change]):
# Write the "Nodes Deleted" section as a markdown table
self.write_markdown_table(f"Nodes removed: {len(rows)}", header, rows)

def handle_new_text_definition(self, value:List[Change]):
def handle_new_text_definition(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -256,7 +256,7 @@ def handle_new_text_definition(self, value:List[Change]):
header = "| Term | New Text Definition |"
self.write_markdown_table(f"Text definitions added: {len(rows)}", header, rows)

def handle_remove_text_definition(self, value:List[Change]):
def handle_remove_text_definition(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -267,7 +267,7 @@ def handle_remove_text_definition(self, value:List[Change]):
header = "| Term | Removed Text Definition |"
self.write_markdown_table(f"Text definitions removed: {len(rows)}", header, rows)

def handle_node_obsoletion_with_direct_replacement(self, value:List[Change]):
def handle_node_obsoletion_with_direct_replacement(self, value: List[Change]):
rows = list(
{
f"| {self._format_entity_labels(change.about_node)} |\
Expand All @@ -278,12 +278,12 @@ def handle_node_obsoletion_with_direct_replacement(self, value:List[Change]):
header = "| Term | Replacement |"
self.write_markdown_table(f"Nodes obsoleted with replacement: {len(rows)}", header, rows)

def handle_node_obsoletion(self, value:List[Change]):
def handle_node_obsoletion(self, value: List[Change]):
rows = [f"| {self._format_entity_labels(change.about_node)} |" for change in value]
header = "| Term |"
self.write_markdown_table(f"Nodes obsoleted without replacement: {len(rows)}", header, rows)

def handle_node_direct_merge(self, value:List[Change]):
def handle_node_direct_merge(self, value: List[Change]):
rows = list(
{
f"| {self._format_entity_labels(change.about_node)} |\
Expand All @@ -294,7 +294,7 @@ def handle_node_direct_merge(self, value:List[Change]):
header = "| Term | Replacement |"
self.write_markdown_table(f"Nodes merged: {len(rows)}", header, rows)

def handle_add_node_to_subset(self, value:List[Change]):
def handle_add_node_to_subset(self, value: List[Change]):
rows = list(
{
f"| {self._format_entity_labels(change.about_node)} | {change.in_subset} |"
Expand All @@ -304,7 +304,7 @@ def handle_add_node_to_subset(self, value:List[Change]):
header = "| Term | Subset |"
self.write_markdown_table(f"Nodes added to subset: {len(rows)}", header, rows)

def handle_remove_node_from_subset(self, value:List[Change]):
def handle_remove_node_from_subset(self, value: List[Change]):
rows = list(
{
f"| {self._format_entity_labels(change.about_node)} | {change.in_subset} |"
Expand All @@ -314,7 +314,7 @@ def handle_remove_node_from_subset(self, value:List[Change]):
header = "| Term | Subset |"
self.write_markdown_table(f"Nodes removed from subset: {len(rows)}", header, rows)

def handle_mapping_creation(self, value:List[Change]):
def handle_mapping_creation(self, value: List[Change]):
rows = list(
{
f"""| {self._format_entity_labels(change.subject)} | """
Expand All @@ -327,7 +327,7 @@ def handle_mapping_creation(self, value:List[Change]):
header = "| Subject | Predicate | Object |"
self.write_markdown_table(f"Mappings added: {len(rows)}", header, rows)

def handle_mapping_predicate_change(self, value:List[Change]):
def handle_mapping_predicate_change(self, value: List[Change]):
# Create rows for the table
rows = list(
{
Expand All @@ -345,7 +345,7 @@ def handle_mapping_predicate_change(self, value:List[Change]):
# Write the "Predicate Changed" section as a collapsible markdown table
self.write_markdown_table(f"Mappings changed: {len(rows)}", header, rows)

def handle_remove_mapping(self, value:List[Change]):
def handle_remove_mapping(self, value: List[Change]):
rows = list(
{
f"""| {self._format_entity_labels(change.about_node)} | """
Expand Down

0 comments on commit 5aefa2d

Please sign in to comment.