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

implement strict PhoneDevice identification #662

Conversation

jpaniagualaconich
Copy link
Contributor

Fixes #661

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Sep 10, 2023

Codecov Report

Merging #662 (7c96114) into master (d6d8b63) will increase coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #662      +/-   ##
==========================================
+ Coverage   95.44%   95.45%   +0.01%     
==========================================
  Files          76       76              
  Lines        3293     3301       +8     
  Branches      377      375       -2     
==========================================
+ Hits         3143     3151       +8     
  Misses        119      119              
  Partials       31       31              
Files Changed Coverage Δ
two_factor/plugins/phonenumber/method.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

return isinstance(device, PhoneDevice)
if not isinstance(device, PhoneDevice):
return False
return device.method == self.code
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can write return isinstance(device, PhoneDevice) and device.method == self.code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@jpaniagualaconich jpaniagualaconich force-pushed the bugfix/stricter-phone-method-behaviour-based-on-code branch from 697a503 to 7c96114 Compare September 10, 2023 19:49
@claudep claudep merged commit 925eab9 into jazzband:master Sep 10, 2023
7 checks passed
@jpaniagualaconich jpaniagualaconich deleted the bugfix/stricter-phone-method-behaviour-based-on-code branch September 10, 2023 20:46
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.

PhoneDevice identification is lax
2 participants