mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
Rewrite mock.mock attribute accesses (#1533)
This commit is contained in:
7
resources/test/fixtures/pyupgrade/UP026.py
vendored
7
resources/test/fixtures/pyupgrade/UP026.py
vendored
@@ -65,3 +65,10 @@ if True:
|
||||
if True:
|
||||
# This should yield multiple, aliased imports.
|
||||
from mock import mock as foo, mock as bar, mock
|
||||
|
||||
|
||||
# This should be unchanged.
|
||||
x = mock.Mock()
|
||||
|
||||
# This should change to `mock.Mock`().
|
||||
x = mock.mock.Mock()
|
||||
|
||||
Reference in New Issue
Block a user