Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two_factor_authentication in AuthenticatedUser. #1972

Merged
merged 1 commit into from Oct 19, 2021

Conversation

Hanaasagi
Copy link
Contributor

closes #1971

@@ -76,6 +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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue() please

@s-t-e-v-e-n-k
Copy link
Collaborator

Further more, please run tox -elint, that's the cause of the 3.6 CI failure.

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2021

Codecov Report

Merging #1972 (3b52e7f) into master (7a54218) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 3b52e7f differs from pull request most recent head d2ab637. Consider uploading reports for the commit d2ab637 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1972   +/-   ##
=======================================
  Coverage   98.86%   98.86%           
=======================================
  Files         108      108           
  Lines       11065    11072    +7     
=======================================
+ Hits        10939    10946    +7     
  Misses        126      126           
Impacted Files Coverage Δ
github/AuthenticatedUser.py 99.02% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a54218...d2ab637. Read the comment docs.

@Hanaasagi
Copy link
Contributor Author

Here is the error message when I run the tox -elint in my local. The types-requests and types-jwt is not installed. I'm not sure why the master branch could pass this test.

图片

@Hanaasagi
Copy link
Contributor Author

I try a new Python 3.6.13 virtualenv, install the newest tox(3.23.1) in my local. The master branch could not pass the lint. Missing the types-jwt and types-request too.

@Hanaasagi
Copy link
Contributor Author

I find the difference!. The pre success CI uses the mypy==0.812. See the Action log: https://github.com/PyGithub/PyGithub/runs/2724801619#step:5:10. And now it uses the mypy==0.902. It has a breaking change:

Mypy now only ships with type stubs for stdlib modules (plus typing_extensions and mypy_extensions). If you use third-party libraries that don’t include stubs or inline type annotations, you can explicitly install stub packages, usually called types-.

@s-t-e-v-e-n-k
Copy link
Collaborator

You can revert that tox.ini change, I have a separate PR up that I will merge that adds that.

@Hanaasagi
Copy link
Contributor Author

Done.

@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit 4f00cbf into PyGithub:master Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing two_factor_authentication attribute in AuthenticatedUser
3 participants