45f77ccccf5a22c1722680f05fac0ee96dd7f87b,homeassistant/auth/mfa_modules/insecure_example.py,InsecureExampleModule,async_is_user_setup,#InsecureExampleModule#Any#,78
Before Change
async def async_is_user_setup(self, user_id: str) -> bool:
Return whether user is setup.
for data in self._data:
if data["user_id"] == user_id:
return True
return False
async def async_validate(self, user_id: str, user_input: dict[str, Any]) -> bool:
Return True if validation passed.
for data in self._data:
After Change
async def async_is_user_setup(self, user_id: str) -> bool:
Return whether user is setup.
return any(data["user_id"] == user_id for data in self._data)
async def async_validate(self, user_id: str, user_input: dict[str, Any]) -> bool:
Return True if validation passed.
return any(
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 10
Instances
Project Name: home-assistant/home-assistant
Commit Name: 45f77ccccf5a22c1722680f05fac0ee96dd7f87b
Time: 2021-03-27
Author: git@frenck.dev
File Name: homeassistant/auth/mfa_modules/insecure_example.py
Class Name: InsecureExampleModule
Method Name: async_is_user_setup
Project Name: matplotlib/matplotlib
Commit Name: dd1c386c8f5c2e223b27f16f67e1c603b83eb449
Time: 2018-10-06
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/contour.py
Class Name: ContourLabeler
Method Name: too_close
Project Name: home-assistant/home-assistant
Commit Name: 87499989a041ab83bc1b33d16e1947d4005479f7
Time: 2021-03-20
Author: git@frenck.dev
File Name: homeassistant/components/homekit/config_flow.py
Class Name: ConfigFlow
Method Name: _async_is_unique_name_port
Project Name: jazzband/django-debug-toolbar
Commit Name: 6768be17c4a9bd151fa90363c559bd15aeb395e7
Time: 2013-10-21
Author: aymeric.augustin@m4x.org
File Name: debug_toolbar/utils/__init__.py
Class Name:
Method Name: omit_path