Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ like something that makes sense for Braindrop I'll turn it into an issue
from there.

Be sure to [have a look over the TODO
isues](https://github.com/davep/braindrop/issues?q=is%3Aissue+is%3Aopen+label%3ATODO)
issues](https://github.com/davep/braindrop/issues?q=is%3Aissue+is%3Aopen+label%3ATODO)
before leaving a request, it might be I'm already planning on implementing
whatever it is you're asking for.

Expand Down
6 changes: 3 additions & 3 deletions src/braindrop/app/data/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def collection_size(self, collection: Collection) -> int:
# can work it out).
return collection.count or len(self.in_collection(collection))

class UnknonwCollection(Exception):
class UnknownCollection(Exception):
"""Exception raised if we encounter a collection ID we don't know about."""

def collection(self, identity: int) -> Collection:
Expand All @@ -201,7 +201,7 @@ def collection(self, identity: int) -> Collection:
else self._collections[identity]
)
except KeyError:
raise self.UnknonwCollection(
raise self.UnknownCollection(
f"Unknown collection identity: {identity}"
) from None

Expand Down Expand Up @@ -241,7 +241,7 @@ def _collections(collection_ids: Iterable[int]) -> Iterator[Collection]:
for candidate in self.collections
if candidate.parent == collection
)
except self.UnknonwCollection:
except self.UnknownCollection:
pass

return list(_collections(group.collections))
Expand Down
2 changes: 1 addition & 1 deletion src/braindrop/app/widgets/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def _main_navigation(self) -> None:
self._add_children_for(
self._add_collection(self.data.collection(collection))
)
except self.data.UnknonwCollection:
except self.data.UnknownCollection:
# It seems that the Raindrop API can sometimes say
# there's a collection ID in a group where the
# collection ID isn't in the actual collections the
Expand Down
2 changes: 1 addition & 1 deletion src/braindrop/app/widgets/raindrops_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class RaindropsView(EnhancedOptionList):
## The Raindrop collection view

This panel shows the currently-selected collection of Raindrops,
filtered by any tag ans search text you may have applied.
filtered by any tag and search text you may have applied.

Each Raindrop may have one or more icons showing to the right, these
include:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_sort_tags() -> None:

##############################################################################
@mark.parametrize("string", ("", "1"))
def test_tag_langth(string: str) -> None:
def test_tag_length(string: str) -> None:
"""We should be able to get the len of a tag."""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, no, len is correct here; it's testing if we can get the len of the tag -- as in it should be possible to call the function len on the tag.

assert len(Tag(string)) == len(string)

Expand Down
Loading