adamchainz / flake8-tidy-imports

❄️ A flake8 plugin that helps you write tidier imports.
MIT License
72 stars 15 forks source link

I251 doesn't pick up on attribute access #63

Open adamchainz opened 7 years ago

adamchainz commented 7 years ago

If you have banned-modules set to foo.bar = baz, this code doesn't trigger an error:

import foo

foo.bar

...when really it should.

adamantike commented 1 year ago

We are migrating some projects to UUIDv7, and found this same limitation when trying to avoid using uuid.uuid4(). With the following configuration, the error isn't triggered:

[flake8]
banned-modules =
  uuid.uuid4 = Use UUIDv7 instead, with uuid6.uuid7().