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

Should subclass-builtin (FURB189) not apply to stubs? #15291

Open
Avasam opened this issue Jan 6, 2025 · 0 comments
Open

Should subclass-builtin (FURB189) not apply to stubs? #15291

Avasam opened this issue Jan 6, 2025 · 0 comments
Labels
rule Implementing or modifying a lint rule

Comments

@Avasam
Copy link
Contributor

Avasam commented Jan 6, 2025

I don't think that subclass-builtin (FURB189) should apply to stubs (it currently does).
Stubs authors should aim to faithfully represent the runtime implementation. And if the runtime subclasses dict, list or str. So should the stubs.

Third-party stub authors have no control on this. First-party stubs would get FURB189 in their source .py files.

Ruff: 0.8.5 (rule is currently in preview)

(this report is extracted from #14535 (comment) for ease of tracking and discussion)

@Avasam Avasam changed the title Should subclass-builtin (FURB189) apply to stubs? Should subclass-builtin (FURB189) not apply to stubs? Jan 6, 2025
@dhruvmanila dhruvmanila added the question Asking for support or clarification label Jan 6, 2025
@MichaReiser MichaReiser added rule Implementing or modifying a lint rule and removed question Asking for support or clarification labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

No branches or pull requests

3 participants