Static type checking with mypy
This does introduce some not-so-nice things, like having to annotate each `__init__` function with `-> None`. However, the benefits of having static type checking in a complex bit of software like BAT outweigh the downsides.
This commit is contained in:
@@ -8,7 +8,7 @@ log = logging.getLogger(__name__)
|
||||
class DoesNotExist(OSError):
|
||||
"""Indicates a path does not exist on the filesystem."""
|
||||
|
||||
def __init__(self, path: pathlib.Path):
|
||||
def __init__(self, path: pathlib.Path) -> None:
|
||||
super().__init__(path)
|
||||
self.path = path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user