Skip to content

Conversation

@jparise
Copy link
Member

@jparise jparise commented Mar 24, 2025

Python 3.6 introduced __init_subclass__(cls), which provides a nicer subclass registration pattern than the previous metaclass-based approach.

Python 3.6 introduced __init_subclass__(cls), which provides a nicer
subclass registration pattern than the previous metaclass-based
approach.
@jparise jparise requested a review from sigmavirus24 March 24, 2025 15:15
Copy link
Member

@sigmavirus24 sigmavirus24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're adding annotations should we start linting with mypy too? At least to avoid regressions

from fnmatch import fnmatchcase
from functools import partial
from itertools import chain
from typing import List, Tuple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer import typing as t but won't inflict that on others

@jparise
Copy link
Member Author

jparise commented Mar 25, 2025

If we're adding annotations should we start linting with mypy too? At least to avoid regressions

Yes, it's on my "list" of things to try out. mypy reports a bunch of issues in the code's current state so there's some initial work to do before getting the CI job in place.

@jparise jparise merged commit 77da152 into PyCQA:main Mar 25, 2025
6 checks passed
@jparise jparise deleted the init_subclass branch March 25, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants