Skip to content

Commit

Permalink
add from __future__ import annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Dec 27, 2024
1 parent e27020a commit 5c6fb07
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/bloom_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import hashlib
import os
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/countingbloom_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import hashlib
import os
import sys
Expand Down
3 changes: 2 additions & 1 deletion tests/countingcuckoo_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Unittest class"""

from __future__ import annotations

import hashlib
import os
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/countminsketch_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import hashlib
import os
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/cuckoo_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import hashlib
import os
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/expandingbloom_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import hashlib
import os
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/hashes_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import hashlib
import sys
import unittest
Expand Down
2 changes: 2 additions & 0 deletions tests/quotientfilter_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Unittest class"""

from __future__ import annotations

import os
import random
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""probables utilitites tests"""

from __future__ import annotations

import os
import sys
import unittest
Expand Down
5 changes: 3 additions & 2 deletions tests/utilities.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""utility functions"""

from __future__ import annotations

from hashlib import md5
from pathlib import Path
from typing import Union

from probables.constants import UINT64_T_MAX
from probables.hashes import KeyT


def calc_file_md5(filename: Union[str, Path]) -> str:
def calc_file_md5(filename: str | Path) -> str:
"""calc the md5 of a file"""
with open(filename, "rb") as filepointer:
res = filepointer.read()
Expand Down

0 comments on commit 5c6fb07

Please sign in to comment.