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

python can run. but intent me exist problem. #5332

Closed
ciaoyizhen opened this issue Jan 7, 2024 · 2 comments
Closed

python can run. but intent me exist problem. #5332

ciaoyizhen opened this issue Jan 7, 2024 · 2 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@ciaoyizhen
Copy link

ciaoyizhen commented Jan 7, 2024

python = 3.9.6
pylance = 2023.12.102
environment : mac

code can be run.
class Human(type):
@staticmethod
def new(msc, *args, **kwargs):
# 需要调用父类的方法造一个对象出来
class_ = super().new(msc, *args, **kwargs)
class_.freedom = True
return class_

class Student(object, metaclass=Human):
pass

print(Student.freedom)

Snipaste_2024-01-05_23-32-11
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Jan 7, 2024
@ciaoyizhen
Copy link
Author

extension is error lens. he tell me the extension can not generate error and I should ask for someone who use python.

@ciaoyizhen
Copy link
Author

In addition, this will not report an error in pycharm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants