Skip to content

Conversation

aliafzal
Copy link
Contributor

Summary:
Lint error E721 occurs when the type() function is used for type comparison instead of the more flexible isinstance().
The isinstance() function can handle subclasses as well.
The codemod only replaces type() function with isinstance() function for type comparison and preserves
the existing code functionality while improving code extensibility for future changes.

Differential Revision: D83559508

Summary:
Lint error E721 occurs when the type() function is used for type comparison instead of the more flexible isinstance().
The isinstance() function can handle subclasses as well.
The codemod only replaces type() function with isinstance() function for type comparison and preserves
the existing code functionality while improving code extensibility for future changes.

Differential Revision: D83559508
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 30, 2025
@facebook-github-bot
Copy link
Contributor

@aliafzal has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83559508.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants