| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/types/field.py:348: error: Unused "type: ignore" comment [unused-ignore]
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/_epub_base.py:34:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
+ sphinx/testing/util.py:80:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
|
Sorry, something went wrong.
| get_proper_type(self.ret_type), UninhabitedType | ||
| return self.fallback.type.is_metaclass() and ( | ||
| self.instance_type is not None | ||
| or not isinstance(get_proper_type(self.ret_type), UninhabitedType) |
There was a problem hiding this comment.
is the or not isinstance(get_proper_type(self.ret_type), UninhabitedType) still needed (after #21441)? can we remove it?
Sorry, something went wrong.
There was a problem hiding this comment.
if remove only or not isinstance(get_proper_type(self.ret_type), UninhabitedType) in pytest-fast failed 11 tests:
FAILED mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testDataclassDefaultFactoryTypedDict - data: [PROJECT_ROOT]\test-data\unit\check-dataclasses.test:2893: FAILED mypy/test/testcheck.py::TypeCheckSuite::check-type-object-type-inference.test::testInferTupleType - data: [PROJECT_ROOT]\test-data\unit\check-type-object-type-inference.test:1: FAILED mypy/test/testdeps.py::GetDependenciesSuite::deps.test::testTypedDict - data: [PROJECT_ROOT]\test-data\unit\deps.test:659: FAILED mypy/test/testdeps.py::GetDependenciesSuite::deps.test::testTypedDict2 - data: [PROJECT_ROOT]\test-data\unit\deps.test:673: FAILED mypy/test/testdeps.py::GetDependenciesSuite::deps.test::testTypedDict3 - data: [PROJECT_ROOT]\test-data\unit\deps.test:691: FAILED mypy/test/testcheck.py::TypeCheckSuite::check-typeddict.test::testTypedDictWithIsInstanceAndIsSubclass - data: [PROJECT_ROOT]\test-data\unit\check-typeddict.test:961: FAILED mypy/test/testcheck.py::TypeCheckSuite::check-typeddict.test::testGenericTypedDictCreation - data: [PROJECT_ROOT]\test-data\unit\check-typeddict.test:3302: FAILED mypy/test/testcheck.py::TypeCheckSuite::check-typeddict.test::testTypedDictAttributeOnClassObject - data: [PROJECT_ROOT]\test-data\unit\check-typeddict.test:3414: FAILED mypy/test/testcheck.py::TypeCheckSuite::check-typeddict.test::testGenericTypedDictCallSyntax - data: [PROJECT_ROOT]\test-data\unit\check-typeddict.test:3465: FAILED mypy/test/testtypes.py::JoinSuite::test_simple_type_objects - assert False FAILED mypy/test/testsubtypes.py::SubtypingSuite::test_type_callable_subtyping - AssertionError: def (A) -> B subtype of def (A) -> B
if save only return self.fallback.type.is_metaclass(), tests pass, but get_instance_type may start returning UninhabitedType, and then type_object will fail on assert isinstance(instance_type, Instance) (on types created by plugins that do not set instance_type, but ret_type is UninhabitedType).
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #16981
If __new__/__init__ return Never/NoReturn, after this fix, you can get attribute/method from class.