Ticket8527 ruff pyright#4
Conversation
| raise NothingToCommitError(self) | ||
|
|
||
| def create_submodule(self, name: str, url: str, path: str) -> None: | ||
| def create_submodule(self, name: str, url: str, path: str) -> None: # pyright: ignore |
There was a problem hiding this comment.
What was pyright unhappy with here?
There was a problem hiding this comment.
the overloaded class returns a "Submodule" object for that method which it can't replace with None. I couldn't see an easy way of creating a fake Submodule to be returned to nothing.
There was a problem hiding this comment.
Oh I see... That's not ideal overriding someone elses' class in an incompatible way like that...
I think that is pyright pointing out something we genuinely shouldn't be doing, but I guess 🤷 if you want to leave it (if you do want to fix it, I think just renaming the method where we use it to something that doesn't conflict with the base class would be sufficient)
|
I notice the It's also not using our standard |
|
didn't notice that, changing it |
e7c845c to
2f3593a
Compare
|
when I run ruff -check on a generated device (having made no changes to the device), I get: running ruff -format also finds results |
|
Additionally, when I run pyright against a generated device, I get: |
|
I am getting few ruff and pyright issues. Could you run it against the latest ruff configuration once please.? |
|
@Chsudeepta different ones to the ones I reported? |
|
@GRyall , yes, different, but similar as multiple imports couldn't be resolved. |
|
@Chsudeepta did you use the ruff.toml that is distributed with the repo? |
|
@GRyall These are mostly pyright issues (those that are similar to the ones you reported above). There are also a host ruff issues extracted by running the script in reusable-workflows |
Ruff/pyright the device generator
To review: