Skip to content

Commit

Permalink
Merge pull request #22 from kurtmckee/expand-to-100pct-coverage
Browse files Browse the repository at this point in the history
Remove an unnecessary conditional
  • Loading branch information
Pevtrick authored Jul 31, 2024
2 parents 9b5469e + ebdeb5f commit 4dbf371
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ source = [

[tool.coverage.report]
skip_covered = true
fail_under = 99
fail_under = 100

[tool.coverage.html]
directory = "htmlcov/"
Expand Down
11 changes: 5 additions & 6 deletions sqids/sqids.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ def decode(self, id_: str) -> List[int]:
while id_:
separator = alphabet[0]
chunks = id_.split(separator)
if chunks:
if not chunks[0]:
return ret
if not chunks[0]:
return ret

ret.append(self.__to_number(chunks[0], alphabet[1:]))
if len(chunks) > 1:
alphabet = self.__shuffle(alphabet)
ret.append(self.__to_number(chunks[0], alphabet[1:]))
if len(chunks) > 1:
alphabet = self.__shuffle(alphabet)

id_ = separator.join(chunks[1:])

Expand Down

0 comments on commit 4dbf371

Please sign in to comment.