-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Azureblade3808/v0.2.x
V0.2.1
- Loading branch information
Showing
9 changed files
with
229 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__version__ = "0.2.0" | ||
__version__ = "0.2.1" | ||
|
||
from .__public__ import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from __future__ import annotations | ||
|
||
__all__ = [ | ||
"WILDCARD", | ||
"sequence_has_prefix", | ||
] | ||
|
||
from collections.abc import Sequence | ||
from typing import Any | ||
|
||
|
||
class _Wildcard: | ||
""" | ||
An object that equals any object. | ||
""" | ||
|
||
def __eq__(self, other: object, /) -> bool: | ||
return True | ||
|
||
|
||
WILDCARD = _Wildcard() | ||
|
||
|
||
def sequence_has_prefix(sequence: Sequence[Any], prefix: Sequence[Any], /) -> bool: | ||
return tuple(sequence[: len(prefix)]) == tuple(prefix) |
Oops, something went wrong.