Skip to content

Commit

Permalink
Added typing support
Browse files Browse the repository at this point in the history
  • Loading branch information
plasticuproject committed Sep 2, 2024
1 parent 0bbbbe7 commit 753c564
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include fnv1a/py.typed
31 changes: 31 additions & 0 deletions fnv1a/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""__init__.pyi"""
from __future__ import annotations
from typing import TypeVar, Type

T = TypeVar("T")


class FNV1a:
_seed: int
_prime: int
_mask: int

def __init__(self) -> None:
self.hash_list: list[int]
self.hash_out: str | None
self.text: str | None

def __repr__(self) -> str:
...

def hash(self, text: str | None) -> str | None:
...

def _clear(self) -> None:
...

def _type_check(self, value: T, value_type: Type[T]) -> None:
...

def dehash(self, hash_list: list[int] | None = None) -> str | None:
...
1 change: 1 addition & 0 deletions fnv1a/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Marker file for PEP 561.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fnv1a"
version = "0.1.9"
version = "0.2.0"
authors = [
{ name="plasticuproject", email="plasticuproject@pm.me" },
]
Expand All @@ -16,7 +16,7 @@ requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta", "Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Utilities",
]
Expand Down

0 comments on commit 753c564

Please sign in to comment.