diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index ad86640040..c66b9a53c2 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -1465,6 +1465,6 @@ def _useAttributes(self, attributes): if "url" in attributes: # pragma no branch self._url = self._makeStringAttribute(attributes["url"]) if "two_factor_authentication" in attributes: - self._two_factor_authentication = ( - self._makeBoolAttribute(attributes["two_factor_authentication"]) + self._two_factor_authentication = self._makeBoolAttribute( + attributes["two_factor_authentication"] ) diff --git a/tests/AuthenticatedUser.py b/tests/AuthenticatedUser.py index 915b73aaa3..61edafe77b 100644 --- a/tests/AuthenticatedUser.py +++ b/tests/AuthenticatedUser.py @@ -76,7 +76,7 @@ def testAttributes(self): self.assertEqual(self.user.url, "https://api.github.com/users/jacquev6") self.assertEqual(self.user.node_id, "MDQ6VXNlcjMyNzE0Ng==") self.assertEqual(repr(self.user), 'AuthenticatedUser(login="jacquev6")') - self.assertEqual(self.user.two_factor_authentication, True) + self.assertTrue(self.user.two_factor_authentication) def testEditWithoutArguments(self): self.user.edit() diff --git a/tox.ini b/tox.ini index a7e67b244b..42e09fc002 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,8 @@ skip_install = true deps = pre-commit mypy + types-requests + types-jwt commands = pre-commit run --all-files --show-diff-on-failure ; Run mypy outside pre-commit because pre-commit runs mypy in a venv