Skip to content

--ignore-patterns for .pyi stubs has no effect if .py resolves to .pyi anyway #9623

@henryiii

Description

@henryiii

Bug description

tool.pylint.ignore-patterns stopped working in pylint 3.2.0. Pylint can't handle .pyi files yet, it just treats them like .py, which causes it to report that | is invalid, etc.

Configuration

[tool.pylint]
ignore-patterns = ['.*\.pyi']

Command used

pylint scikit_build_core

(technically nox -s pylint in https://github.com/scikit-build/scikit-build-core)

Pylint output

src/scikit_build_core/_version.pyi:2:15: E1131: unsupported operand type(s) for | (unsupported-binary-operation)

Expected behavior

It should skip the ignored files. It does if I pin 3.1.*.

Pylint version

pylint 3.2.0
astroid 3.2.0
Python 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)]

OS / Environment

macOS.

Additional dependencies

No response

Metadata

Metadata

Labels

Needs PRThis issue is accepted, sufficiently specified and now needs an implementationRegression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions