Skip to content

Commit

Permalink
additional mypy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Jan 6, 2024
1 parent 44d1d27 commit a642888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
7 changes: 3 additions & 4 deletions probables/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import mmap
import string
from array import array
from io import BufferedReader
from pathlib import Path
from typing import Union
from typing import List, Optional, Union


def is_hex_string(hex_string: Union[str, None]) -> bool:
Expand Down Expand Up @@ -53,8 +54,6 @@ def __exit__(self, *args, **kwargs) -> None:
self.map.close()
if self.__f:
self.__f.close()
self.__f = None
self.__m = None
self._closed = True

@property
Expand Down Expand Up @@ -120,7 +119,7 @@ def bitarray(self) -> array:
"""The bitarray"""
return self._bitarray

def __getitem__(self, key: Union[int, slice]) -> int:
def __getitem__(self, key: Union[int, slice]) -> Union[int, List[int]]:
if isinstance(key, slice):
indices = range(*key.indices(self._size))
return [self.check_bit(i) for i in indices]
Expand Down
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ Homepage = "https://github.com/barrust/pyprobables"
Bug-tracker = "https://github.com/barrust/pyprobables/issues"
Documentation = "https://pyprobables.readthedocs.io/"

[tool.poetry]
packages = [{ include = "probables" }]

[tool.poetry.dev-dependencies]
pre-commit = { version = ">=2.18.1", python = "^3.6.1" }
black = { version = "^20.8b1", python = "^3.6" }
isort = { version = "^5.6.4", python = "^3.6" }
pytest = { version = "^6.1.1", python = "^3.6" }
flake8 = { version = "^3.6.0", python = "^3.6" }

[tool.setuptools.packages.find]
include = ["probables", "probables.*"]

Expand Down

0 comments on commit a642888

Please sign in to comment.