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

SG-37888 Python 2 removal #173

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eduardoChaucaGallegos
Copy link
Contributor

Description

  • six.add_metaclass(ShotgunFieldMeta) replaced by metaclass parameter.
  • super format updated

Test

  • Activity Stream on Maya use qtwidgets
    image

@eduardoChaucaGallegos eduardoChaucaGallegos requested a review from a team January 16, 2025 17:13
Copy link
Contributor

@julien-lang julien-lang left a comment

Choose a reason for hiding this comment

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

Looks good. Only a few comments

field_class = super(ShotgunFieldMeta, mcl).__new__(
mcl, name, parents, class_dict
)
field_class = super().__new__(mcl, name, parents, class_dict)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure super() and new() work together?

Comment on lines 136 to 140
getargspec = inspect.getfullargspec

try:
spec = getargspec(attr.__init__)
except TypeError as error:
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the useless variable

Suggested change
getargspec = inspect.getfullargspec
try:
spec = getargspec(attr.__init__)
except TypeError as error:
try:
spec = inspect.getfullargspec(attr.__init__)
except TypeError as error:

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