From a642888fd6ffa7641ead058501ceb301eaede730 Mon Sep 17 00:00:00 2001 From: barrust Date: Fri, 5 Jan 2024 19:35:18 -0500 Subject: [PATCH] additional mypy checks --- probables/utilities.py | 7 +++---- pyproject.toml | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/probables/utilities.py b/probables/utilities.py index d24e438..e9d5b64 100644 --- a/probables/utilities.py +++ b/probables/utilities.py @@ -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: @@ -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 @@ -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] diff --git a/pyproject.toml b/pyproject.toml index 0b9eb79..ae50c6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.*"]