Skip to content

Commit

Permalink
Mark some bits with #pragma: no cover
Browse files Browse the repository at this point in the history
  • Loading branch information
gbenson committed May 30, 2024
1 parent dbca5fc commit 8f614d5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dom_tokenizers/pre_tokenizers/pre_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,15 @@ def _pre_tokenize_dom(
buf = TokenBuffer()
self.pre_tokenize_dom(buf, split.original)
return buf.tokens
except Exception as e:
except Exception as e: # pragma: no cover
logger.exception(f"{type(e).__name__} in pre-tokenizer:")
raise

@abstractmethod
def pre_tokenize_dom(self, buf: TokenBuffer, serialized: str):
def pre_tokenize_dom(
self,
buf: TokenBuffer,
serialized: str): # pragma: no cover
"""Transform a serialized DOM into a sequence of tokens.
"""
raise NotImplementedError

0 comments on commit 8f614d5

Please sign in to comment.