Skip to content

Commit

Permalink
Fix lint issues in python 3.12 lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rustydb committed Nov 5, 2024
1 parent 32301a5 commit d46600e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions canu/generate/switch/config/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# (C) Copyright 2022-2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2022-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -1685,11 +1685,11 @@ def switch_is_primary(switch):

if int(digits) % 2 == 0: # Switch is Secondary
is_primary = False
primary = f"sw-{middle.rstrip('-')}-{int(digits)-1 :03d}"
primary = f"sw-{middle.rstrip('-')}-{int(digits) - 1 :03d}"
secondary = switch
else: # Switch is Primary
is_primary = True
secondary = f"sw-{middle.rstrip('-')}-{int(digits)+1 :03d}"
secondary = f"sw-{middle.rstrip('-')}-{int(digits) + 1 :03d}"
primary = switch

return is_primary, primary, secondary
Expand Down
2 changes: 1 addition & 1 deletion canu/validate/shcd/shcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ def print_node_list(node_list, title, out="-"):
if len(unused_block) == 1:
port_string = f"{unused_block[0]:02}==>UNUSED"
else:
port_string = f"{unused_block[0]:02}-{unused_block[len(unused_block)-1]:02}==>UNUSED"
port_string = f"{unused_block[0]:02}-{unused_block[len(unused_block) - 1]:02}==>UNUSED"
unused_block = [] # reset
click.secho(f" {port_string}", fg="green", file=out)

Expand Down
2 changes: 1 addition & 1 deletion network_modeling/NetworkNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def connect(
if index > len(self.__ports) - 1 or index < 0:
raise Exception(
f"{__name__} Port {src_port.port()} was requested from {self.__id}:{self.__common_name} "
f"but only {len(self.__ports)-1} Ports are available on the Node.",
f"but only {len(self.__ports) - 1} Ports are available on the Node.",
)

if self.__ports[index] is not None:
Expand Down

0 comments on commit d46600e

Please sign in to comment.