Skip to content

Commit

Permalink
fstrings pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
whoburg committed Jan 5, 2024
1 parent 56b3f52 commit 05e39c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpkit/varkey.py
Expand Up @@ -53,7 +53,7 @@ def __getstate__(self):
state = self.descr.copy()
for key, value in state.items():
if getattr(value, "__call__", None):
state[key] = "unpickleable function %s" % value
state[key] = f"unpickleable function {value}"
return state

def __setstate__(self, state):
Expand Down Expand Up @@ -92,6 +92,7 @@ def str_without(self, excluded=()): # pylint:disable=too-many-branches
name = ".".join(namespace) + "." + name
if "idx" not in excluded:
if self.idx:
# pylint: disable=consider-using-f-string # considered it
name += "[%s]" % ",".join(map(str, self.idx))
elif "vec" not in excluded and self.shape:
name += "[:]"
Expand Down

0 comments on commit 05e39c1

Please sign in to comment.