autotyping: --none-return: add a -> None return type to functions without any return, yield, or raise in their body

This commit is contained in:
Hugo van Kemenade 2022-04-03 12:43:37 +03:00
parent 4e5fe31572
commit 6c3f3afb3a
12 changed files with 184 additions and 182 deletions

View file

@ -8,7 +8,7 @@ from .test_pylast import TestPyLastWithLastFm
class TestPyLastLibrary(TestPyLastWithLastFm):
def test_repr(self):
def test_repr(self) -> None:
# Arrange
library = pylast.Library(user=self.username, network=self.network)
@ -18,7 +18,7 @@ class TestPyLastLibrary(TestPyLastWithLastFm):
# Assert
self.assert_startswith(representation, "pylast.Library(")
def test_str(self):
def test_str(self) -> None:
# Arrange
library = pylast.Library(user=self.username, network=self.network)
@ -28,21 +28,21 @@ class TestPyLastLibrary(TestPyLastWithLastFm):
# Assert
self.assert_endswith(string, "'s Library")
def test_library_is_hashable(self):
def test_library_is_hashable(self) -> None:
# Arrange
library = pylast.Library(user=self.username, network=self.network)
# Act/Assert
self.helper_is_thing_hashable(library)
def test_cacheable_library(self):
def test_cacheable_library(self) -> None:
# Arrange
library = pylast.Library(self.username, self.network)
# Act/Assert
self.helper_validate_cacheable(library, "get_artists")
def test_get_user(self):
def test_get_user(self) -> None:
# Arrange
library = pylast.Library(user=self.username, network=self.network)
user_to_get = self.network.get_user(self.username)