Skip to content

Commit be62bd8

Browse files
authored
🔀 Merge pull request #244 from davep/update-gophermap
Upgrade to `gophermap` v0.2.0
2 parents e89d023 + 4f15ee2 commit be62bd8

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ keywords = [
2323
dependencies = [
2424
"bagofstuff>=1.2.1",
2525
"gemtext>=1.0.0",
26-
"gophermap>=0.1.1",
26+
"gophermap>=0.2.0",
2727
"port70>=0.1.2",
2828
"port79>=1.0.0",
2929
"pyperclip>=1.11.0",

src/rogallo/document.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
##############################################################################
99
# Gophermap imports.
10-
from gophermap import GopherMap, GopherMapError, ItemType
10+
from gophermap import GopherMap, ItemType
1111

1212
##############################################################################
1313
# Local imports.
@@ -63,11 +63,7 @@ def is_gophermap(self) -> bool:
6363
@cached_property
6464
def is_gopher_error(self) -> bool:
6565
"""`True` if the document is a Gopher error document, `False` otherwise."""
66-
try:
67-
items = GopherMap(self.content).items
68-
except GopherMapError:
69-
return False
70-
return ItemType.ERROR in {item.type for item in items}
66+
return ItemType.ERROR in {item.type for item in GopherMap(self.content).items}
7167

7268
@property
7369
def is_source(self) -> bool:

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)