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

no-name-in-module does not respect patterns in ignored-modules #7578

Closed
danmou opened this issue Oct 6, 2022 · 0 comments · Fixed by #7579 or #9093
Closed

no-name-in-module does not respect patterns in ignored-modules #7578

danmou opened this issue Oct 6, 2022 · 0 comments · Fixed by #7579 or #9093

Comments

@danmou
Copy link
Contributor

danmou commented Oct 6, 2022

Bug description

ignored-modules is supposed to support Unix-style pattern matching, but this is only the case for the no-member check whereas the no-name-in-module check only checks for exact matches. I've already fixed the issue and I'll submit a PR in a moment.

Minimal example

.
├── a.py
└── foo
    ├── bar_pb2.py
    └── __init__.py

a.py:

"""a.py"""
from foo.bar_pb2 import Bar
Bar()

Command used

pylint a.py --ignored-modules='*_pb2'

Pylint output

************* Module a
a.py:2:0: E0611: No name 'Bar' in module 'foo.bar_pb2' (no-name-in-module)

Expected behavior

No error

Pylint version

pylint 2.15.3
astroid 2.12.10
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0]

OS / Environment

No response

Additional dependencies

No response

@danmou danmou added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Oct 6, 2022
@Pierre-Sassoulas Pierre-Sassoulas added Bug 🪲 Work in progress and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Oct 6, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.0.0b1 milestone Apr 3, 2023
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 3.0.0b1, 3.0.0a7 May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants