Skip to content

Commit

Permalink
fix issues in sanity check code
Browse files Browse the repository at this point in the history
  • Loading branch information
fdev31 committed Nov 4, 2024
1 parent 068a933 commit f3cb399
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pyprland/plugins/scratchpads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ async def on_reload(self) -> None:
"""Config loader."""
# Sanity checks
_scratch_classes: dict[str:Scratch] = {}
for scratch in self.config.values():
for uid, scratch in self.config.items():
_klass = scratch.get("class")
if _klass:
if _klass in _scratch_classes:
text = "Scratch class %s is duplicated (in %s and %s)"
args = (
scratch["class"],
scratch.uid,
_scratch_classes[scratch["class"].uid],
uid,
_scratch_classes[_klass],
)
self.log.error(text, *args)
await self.notify_error(text % args)
_scratch_classes[_klass] = scratch
_scratch_classes[_klass] = uid

# Create new scratches with fresh config items
scratches = {name: Scratch(name, self.config) for name, options in self.config.items()}
Expand Down
2 changes: 1 addition & 1 deletion pyprland/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Package version."""

VERSION = "2.4.1"
VERSION = "2.4.1-3"

0 comments on commit f3cb399

Please sign in to comment.