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

Add pyright to our GitHub Actions #173

Open
huan opened this issue Mar 5, 2021 · 0 comments
Open

Add pyright to our GitHub Actions #173

huan opened this issue Mar 5, 2021 · 0 comments
Labels
🔥 enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Mar 5, 2021

pyright is a static python code typing checker written in TypeScript made by Microsoft.

It can get some errors that others can not:

$ pyright src/
No configuration file found.
stubPath /home/huan/wechaty/python-wechaty/typings is not a valid directory.
Assuming Python platform Linux
Searching for source files
Found 28 source files
/home/huan/wechaty/python-wechaty/src/wechaty/__init__.py
  45:5 - error: "get_logger" is unknown import symbol (reportGeneralTypeIssues)
/home/huan/wechaty/python-wechaty/src/wechaty/user/contact_self.py
  51:26 - error: Property setter value type is not assignable to the getter return type
    Type "str | None" cannot be assigned to type "str"
      Type "None" cannot be assigned to type "str" (reportPropertyTypeMismatch)
/home/huan/wechaty/python-wechaty/src/wechaty/user/room.py
  284:39 - error: Cannot access member "contact_id" for type "UrlLink"
    Member "contact_id" is unknown (reportGeneralTypeIssues)
/home/huan/wechaty/python-wechaty/src/wechaty/user/url_link.py
  44:37 - error: Argument of type "str | None" cannot be assigned to parameter "__obj" of type "Sized" in function "len"
    Type "str | None" cannot be assigned to type "Sized"
      "__len__" is not present (reportGeneralTypeIssues)
  47:52 - error: Argument of type "str | None" cannot be assigned to parameter "__obj" of type "Sized" in function "len"
    Type "str | None" cannot be assigned to type "Sized"
      "__len__" is not present (reportGeneralTypeIssues)
  50:49 - error: Argument of type "str | None" cannot be assigned to parameter "__obj" of type "Sized" in function "len"
    Type "str | None" cannot be assigned to type "Sized"
      "__len__" is not present (reportGeneralTypeIssues)
6 errors, 0 warnings, 0 infos 
Completed in 1.334sec

To be added.

@huan huan added the 🔥 enhancement New feature or request label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant