Sitelet https://web.archive.org/web/20220703214848/https://github.com/asottile/pyupgrade/issues/532
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

Remove inheriting from object when creating classes with type() #532

Open
verhovsky opened this issue Sep 12, 2021 · 0 comments
Open

Remove inheriting from object when creating classes with type() #532

verhovsky opened this issue Sep 12, 2021 · 0 comments

Comments

@verhovsky
Copy link
Sponsor Contributor

@verhovsky verhovsky commented Sep 12, 2021

Just as

class A(object): pass

is re-written as

class A: pass

, so should

A = type("A", (object,), {})

be re-written as

A = type("A", (), {})

See python/cpython#19553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants