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 setting to switch from reporting on a file to reporting on the workspace #81

Closed
karthiknadig opened this issue Jul 7, 2023 · 4 comments · Fixed by #108
Closed
Assignees
Labels
feature-request Request for new features or functionality needs PR verified Verification succeeded
Milestone

Comments

@karthiknadig
Copy link
Member

No description provided.

@MartinBernstorff
Copy link

MartinBernstorff commented Jul 8, 2023

Would this be equivalent to linting across files?

E.g. if I write this implementation in abc.py:

from abc import ABC, ABCMeta, abstractmethod
from typing import Protocol, Tuple


class TestABC(ABC):
    @abstractmethod
    def test(self, testparam2: int) -> float:
        ...


class ABCImplementation(TestABC):
    def test(self, testparam2: str) -> str:
        return testparam2

I get an error

Return type "str" of "test" incompatible with return type "float" in supertype "TestABC"Mypy[override](https://mypy.readthedocs.io/en/latest/_refs.html#code-override)

But if I move TestABC to another file and import it, I don't get the error. E.g:

from TestABC import TestABC


class ABCImplementation(TestABC):
    def test(self, testparam2: str) -> str:
        return testparam2

Is errorless. Pyright in strict mode raises an error in both cases.

@karthiknadig
Copy link
Member Author

Would this be equivalent to linting across files?

That is correct.

@karrtikr
Copy link

karrtikr commented Aug 9, 2023

Adding milestone to make sure this is verified.

@luabud luabud added the verified Verification succeeded label Aug 28, 2023
@luabud
Copy link
Member

luabud commented Aug 28, 2023

I am able to see errors from all files in my workspace, but these problems are still existing: #117, #116 (i.e. python/mypy#15677)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality needs PR verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants