Skip to content

Default src.root to ['.', '<project_name>'] if the directory exists #18141

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

Closed
wants to merge 2 commits into from

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented May 16, 2025

Summary

I noticed in #18137 that we fail to resolve all imports for some ecosystem repositories because they don't use the "traditional" src or flat layouts. Instead, they use a src layout but they use the project name instead of src for the "src folder name".

An example is psycopg where all source files are in psycopg/psycopg/_adapters_map.py:279:14

This PR extends our heuristics for src.root to recognize if a project has a <project>/<project> folder (and no src folder) and, if so, includes it in the src.root.

The motivation for this change is to support more projects with zero configuration.

I don't have a good sense of how common this project layout is, but it seems worth supporting, given that multiple ecosystem projects use it. This also makes our mypy primer results significantely more useful :)

Test plan

See mypy primer results, added unit tests.

@MichaReiser MichaReiser force-pushed the micha/project-name branch from 069d2bb to 7701d68 Compare May 16, 2025 17:57
@MichaReiser MichaReiser added configuration Related to settings and configuration ty Multi-file analysis & type inference labels May 16, 2025
@MichaReiser
Copy link
Member Author

MichaReiser commented May 16, 2025

and mypy primer hangs here too :( I wonder if it is just because of the too large diff. Any suggestions on how I could try this out?

Copy link
Contributor

mypy_primer results

Changes were detected when running on open source projects
psycopg (https://github.com/psycopg/psycopg)
- error[unresolved-import] docs/conf.py:20:8: Cannot resolve imported module `psycopg`
+ warning[unused-ignore-comment] docs/lib/pg3_docs.py:37:21: Unused blanket `type: ignore` directive
- error[unresolved-import] psycopg/psycopg/_adapters_map.py:279:14: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg/psycopg/_typeinfo.py:100:18: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg/psycopg/_typeinfo.py:117:18: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg/psycopg/pq/misc.py:195:10: Cannot resolve imported module `psycopg._conninfo_utils`
- error[unresolved-import] psycopg_c/psycopg_c/_psycopg.pyi:15:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_c/psycopg_c/_psycopg.pyi:16:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] psycopg_c/psycopg_c/_psycopg.pyi:17:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] psycopg_c/psycopg_c/_psycopg.pyi:18:6: Cannot resolve imported module `psycopg.pq.abc`
+ error[invalid-argument-type] psycopg_pool/psycopg_pool/base.py:137:17: Argument to bound method `__init__` is incorrect: Expected `Sequence[Any]`, found `Literal["pool has already been opened/closed and cannot be reused"]`
+ error[invalid-assignment] psycopg_pool/psycopg_pool/pool.py:240:17: Object of type `WaitingClient[Connection[@Todo(Support for `typing.TypeAlias`)]]` is not assignable to `WaitingClient[CT]`
- error[unresolved-import] psycopg_pool/psycopg_pool/_compat.py:21:8: Cannot resolve imported module `psycopg.errors`
- error[unresolved-import] psycopg_pool/psycopg_pool/abc.py:17:10: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/abc.py:18:10: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] psycopg_pool/psycopg_pool/base.py:14:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/base.py:19:10: Cannot resolve imported module `psycopg._connection_base`
- error[unresolved-import] psycopg_pool/psycopg_pool/errors.py:7:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/null_pool.py:15:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/null_pool.py:16:6: Cannot resolve imported module `psycopg.pq`
- error[invalid-exception-caught] psycopg_pool/psycopg_pool/null_pool.py:109:20: Cannot catch object of type `Unknown | <class 'DummyConnectionTimeout'>` in an exception handler (must be a `BaseException` subclass or a tuple of `BaseException` subclasses)
- error[unresolved-import] psycopg_pool/psycopg_pool/null_pool_async.py:12:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/null_pool_async.py:13:6: Cannot resolve imported module `psycopg.pq`
- error[invalid-exception-caught] psycopg_pool/psycopg_pool/null_pool_async.py:104:20: Cannot catch object of type `Unknown | <class 'DummyConnectionTimeout'>` in an exception handler (must be a `BaseException` subclass or a tuple of `BaseException` subclasses)
- error[unresolved-import] psycopg_pool/psycopg_pool/pool.py:23:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/pool.py:24:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/pool.py:25:6: Cannot resolve imported module `psycopg.pq`
+ error[invalid-return-type] psycopg_pool/psycopg_pool/pool.py:263:16: Return type does not match returned value: expected `CT`, found `(Unknown & ~AlwaysFalsy) | Connection[@Todo(Support for `typing.TypeAlias`)]`
+ error[invalid-assignment] psycopg_pool/psycopg_pool/pool_async.py:268:17: Object of type `WaitingClient[AsyncConnection[@Todo(Support for `typing.TypeAlias`)]]` is not assignable to `WaitingClient[ACT]`
- error[unresolved-import] psycopg_pool/psycopg_pool/pool_async.py:20:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/pool_async.py:21:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] psycopg_pool/psycopg_pool/pool_async.py:22:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/_test_connection.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/_test_connection.py:13:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/_test_connection.py:16:10: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/_test_copy.py:3:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/_test_copy.py:4:6: Cannot resolve imported module `psycopg.copy`
- error[unresolved-import] tests/_test_copy.py:5:6: Cannot resolve imported module `psycopg.copy`
- error[unresolved-import] tests/_test_cursor.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/_test_cursor.py:13:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/_test_cursor.py:35:10: Cannot resolve imported module `psycopg.raw_cursor`
+ error[not-iterable] tests/_test_cursor.py:58:35: Object of type `list[Column] | None` may not be iterable
+ error[unresolved-attribute] tests/_test_cursor.py:65:16: Type `<module 'psycopg'>` has no attribute `rows`
- error[unresolved-import] tests/_test_transaction.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/_test_transaction.py:6:6: Cannot resolve imported module `psycopg`
+ warning[possibly-unbound-attribute] tests/crdb/test_adapt.py:37:32: Attribute `oid` on type `Dumper | None` is possibly unbound
- error[unresolved-import] tests/adapters_example.py:3:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/adapters_example.py:4:6: Cannot resolve imported module `psycopg.abc`
- error[unresolved-import] tests/crdb/test_adapt.py:5:6: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/crdb/test_adapt.py:6:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/crdb/test_adapt.py:7:6: Cannot resolve imported module `psycopg.postgres`
- error[unresolved-import] tests/crdb/test_adapt.py:8:6: Cannot resolve imported module `psycopg.types.array`
- error[unresolved-import] tests/crdb/test_connection.py:8:8: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/crdb/test_connection.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_connection.py:10:6: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/crdb/test_connection_async.py:5:8: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/crdb/test_connection_async.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_connection_async.py:7:6: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/crdb/test_copy.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_copy.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_copy.py:12:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/crdb/test_copy.py:13:6: Cannot resolve imported module `psycopg.types.numeric`
- error[unresolved-import] tests/crdb/test_copy_async.py:7:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_copy_async.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_copy_async.py:9:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/crdb/test_copy_async.py:10:6: Cannot resolve imported module `psycopg.types.numeric`
- error[unresolved-import] tests/crdb/test_cursor.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_cursor.py:12:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_cursor.py:13:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/crdb/test_cursor_async.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_cursor_async.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/crdb/test_cursor_async.py:10:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/crdb/test_no_crdb.py:3:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/crdb/test_no_crdb.py:4:6: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/fix_crdb.py:5:6: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/fix_db.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_db.py:13:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_db.py:14:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/fix_db.py:15:6: Cannot resolve imported module `psycopg.pq._debug`
+ warning[possibly-unbound-attribute] tests/fix_db.py:115:32: Attribute `decode` on type `bytes | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/fix_db.py:119:49: Attribute `decode` on type `bytes | None` is possibly unbound
+ error[invalid-assignment] tests/fix_db.py:182:5: Object of type `<class 'PGconnDebug'>` is not assignable to attribute `PGconn` of type `type[PGconn]`
- error[unresolved-import] tests/fix_db.py:248:14: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/fix_db.py:259:14: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/fix_db.py:361:22: Cannot resolve imported module `psycopg.crdb`
- error[unresolved-import] tests/fix_faker.py:16:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_faker.py:17:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_faker.py:18:6: Cannot resolve imported module `psycopg.adapt`
+ error[unresolved-attribute] tests/fix_faker.py:88:14: Type `<module 'psycopg'>` has no attribute `adapt`
- error[unresolved-import] tests/fix_faker.py:19:6: Cannot resolve imported module `psycopg.types.json`
- error[unresolved-import] tests/fix_faker.py:20:6: Cannot resolve imported module `psycopg.types.range`
- error[unresolved-import] tests/fix_faker.py:21:6: Cannot resolve imported module `psycopg.types.numeric`
- error[unresolved-import] tests/fix_faker.py:22:6: Cannot resolve imported module `psycopg.types.multirange`
- error[unresolved-import] tests/fix_pq.py:15:10: Cannot resolve imported module `psycopg`
- warning[unused-ignore-comment] tests/fix_pq.py:17:16: Unused blanket `type: ignore` directive
- error[unresolved-import] tests/fix_pq.py:22:14: Cannot resolve imported module `psycopg`
- warning[possibly-unbound-attribute] tests/fix_pq.py:46:39: Attribute `version` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/fix_pq.py:54:14: Cannot resolve imported module `psycopg.pq.misc`
- warning[possibly-unbound-attribute] tests/fix_pq.py:61:12: Attribute `__impl__` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] tests/fix_pq.py:85:18: Attribute `__build_version__` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] tests/fix_pq.py:95:17: Attribute `abc` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] tests/fix_pq.py:108:32: Attribute `abc` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] tests/fix_pq.py:112:32: Attribute `Trace` on type `Unknown | None` is possibly unbound
- warning[possibly-unbound-attribute] tests/fix_pq.py:115:34: Attribute `ConnStatus` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/fix_proxy.py:11:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_proxy.py:12:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_psycopg.py:9:10: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_psycopg.py:55:14: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_psycopg.py:88:10: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/fix_psycopg.py:91:14: Cannot resolve imported module `psycopg._cmodule`
- error[unresolved-import] tests/fix_psycopg.py:95:16: Cannot resolve imported module `psycopg.generators`
- error[unresolved-import] tests/pool/test_pool.py:14:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pool/test_pool.py:15:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/pool/test_pool.py:16:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/pool/test_pool_async.py:11:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pool/test_pool_async.py:12:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/pool/test_pool_async.py:13:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/pool/test_pool_common.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pool/test_pool_common_async.py:9:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pool/test_pool_null.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pool/test_pool_null.py:13:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/pool/test_pool_null.py:14:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/pool/test_pool_null_async.py:9:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pool/test_pool_null_async.py:10:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/pool/test_pool_null_async.py:11:6: Cannot resolve imported module `psycopg.rows`
+ error[unresolved-attribute] tests/pq/test_async.py:11:12: Type `<module 'psycopg'>` has no attribute `waiting`
- error[unresolved-import] tests/pq/test_async.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_async.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_async.py:7:6: Cannot resolve imported module `psycopg.generators`
- error[unresolved-import] tests/pq/test_conninfo.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_conninfo.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_copy.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_copy.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_escaping.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_escaping.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_exec.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_exec.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_misc.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_misc.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pgconn.py:17:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pgconn.py:18:8: Cannot resolve imported module `psycopg.generators`
- error[unresolved-import] tests/pq/test_pgconn.py:19:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pgconn.py:22:10: Cannot resolve imported module `psycopg.pq.abc`
+ warning[possibly-unbound-attribute] tests/pq/test_pgconn.py:132:33: Attribute `decode` on type `bytes | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/pq/test_pgconn.py:137:33: Attribute `decode` on type `bytes | None` is possibly unbound
+ error[unresolved-attribute] tests/pq/test_pgconn.py:263:5: Type `<module 'psycopg'>` has no attribute `waiting`
- error[unresolved-import] tests/pq/test_pgresult.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pipeline.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pipeline.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pq.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/pq/test_pq.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/bench-411.py:72:20: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/bench-411.py:77:20: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/copytest.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/copytest.py:13:6: Cannot resolve imported module `psycopg`
+ error[unresolved-attribute] tests/scripts/copytest.py:37:30: Type `<module 'psycopg'>` has no attribute `copy`
+ error[unresolved-attribute] tests/scripts/copytest.py:53:30: Type `<module 'psycopg'>` has no attribute `copy`
+ error[invalid-argument-type] tests/scripts/copytest.py:69:22: Argument to bound method `__init__` is incorrect: Expected `LiteralString`, found `str`
- error[unresolved-import] tests/scripts/copytest.py:14:6: Cannot resolve imported module `psycopg.abc`
+ error[unresolved-attribute] tests/scripts/copytest.py:141:21: Type `<module 'psycopg'>` has no attribute `copy`
- error[unresolved-import] tests/scripts/dectest.py:8:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/dectest.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/pipeline-demo.py:22:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/pipeline-demo.py:23:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/pipeline-demo.py:24:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/scripts/pipeline-demo.py:25:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/scripts/pipeline-demo.py:26:6: Cannot resolve imported module `psycopg.abc`
- error[unresolved-import] tests/scripts/pipeline-demo.py:27:6: Cannot resolve imported module `psycopg.generators`
- error[unresolved-import] tests/scripts/spiketest.py:18:8: Cannot resolve imported module `psycopg`
+ warning[possibly-unbound-attribute] tests/test_adapt.py:308:32: Attribute `oid` on type `Dumper | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_adapt.py:333:32: Attribute `oid` on type `Dumper | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_adapt.py:341:32: Attribute `oid` on type `Dumper | None` is possibly unbound
+ error[unresolved-attribute] tests/test_adapt.py:424:33: Type `ModuleType` has no attribute `CDumper`
+ error[unresolved-attribute] tests/test_adapt.py:424:51: Type `ModuleType` has no attribute `CLoader`
- error[unresolved-import] tests/scripts/spiketest.py:20:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/test_adapt.py:9:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_adapt.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_adapt.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_adapt.py:12:6: Cannot resolve imported module `psycopg.abc`
- error[unresolved-import] tests/test_adapt.py:13:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_adapt.py:14:6: Cannot resolve imported module `psycopg._cmodule`
- error[unresolved-import] tests/test_adapt.py:15:6: Cannot resolve imported module `psycopg.postgres`
- error[unresolved-import] tests/test_adapt.py:16:6: Cannot resolve imported module `psycopg.types.array`
- error[unresolved-import] tests/test_adapt.py:17:6: Cannot resolve imported module `psycopg.types.string`
- error[unresolved-import] tests/test_adapt.py:169:10: Cannot resolve imported module `psycopg.types.string`
- error[unresolved-import] tests/test_capabilities.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_capabilities.py:8:10: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_column.py:5:6: Cannot resolve imported module `psycopg.postgres`
- error[unresolved-import] tests/test_concurrency.py:16:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_concurrency.py:17:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_concurrency.py:18:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_concurrency_async.py:14:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_concurrency_async.py:15:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection.py:14:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection.py:15:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection.py:16:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection.py:17:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/test_connection.py:18:6: Cannot resolve imported module `psycopg.conninfo`
+ error[unresolved-attribute] tests/test_connection.py:110:25: Type `<module 'psycopg'>` has no attribute `conninfo`
+ error[unresolved-attribute] tests/test_connection.py:388:24: Type `<module 'psycopg'>` has no attribute `errors`
+ error[unresolved-attribute] tests/test_connection.py:504:25: Type `<module 'psycopg'>` has no attribute `generators`
+ error[unresolved-attribute] tests/test_connection.py:636:35: Type `<module 'psycopg'>` has no attribute `rows`
+ error[unresolved-attribute] tests/test_connection.py:649:35: Type `<module 'psycopg'>` has no attribute `rows`
+ error[unresolved-attribute] tests/test_connection.py:661:47: Type `<module 'psycopg'>` has no attribute `rows`
+ error[unresolved-attribute] tests/test_connection.py:837:11: Type `<module 'psycopg'>` has no attribute `adapt`
- error[unresolved-import] tests/test_connection_async.py:11:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection_async.py:12:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection_async.py:13:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection_async.py:14:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/test_connection_async.py:15:6: Cannot resolve imported module `psycopg.conninfo`
+ error[unresolved-attribute] tests/test_connection_async.py:105:25: Type `<module 'psycopg'>` has no attribute `conninfo`
+ error[unresolved-attribute] tests/test_connection_async.py:384:24: Type `<module 'psycopg'>` has no attribute `errors`
+ error[unresolved-attribute] tests/test_connection_async.py:500:25: Type `<module 'psycopg'>` has no attribute `generators`
+ error[unresolved-attribute] tests/test_connection_async.py:634:40: Type `<module 'psycopg'>` has no attribute `rows`
+ error[unresolved-attribute] tests/test_connection_async.py:646:40: Type `<module 'psycopg'>` has no attribute `rows`
+ error[unresolved-attribute] tests/test_connection_async.py:658:52: Type `<module 'psycopg'>` has no attribute `rows`
+ error[unresolved-attribute] tests/test_connection_async.py:840:11: Type `<module 'psycopg'>` has no attribute `adapt`
- error[unresolved-import] tests/test_connection_info.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_connection_info.py:6:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_connection_info.py:7:6: Cannot resolve imported module `psycopg._encodings`
+ error[unresolved-attribute] tests/test_copy.py:60:18: Type `<module 'psycopg'>` has no attribute `rows`
- error[unresolved-import] tests/test_connection_info.py:50:12: Cannot resolve imported module `psycopg.pq._pq_ctypes`
- error[unresolved-import] tests/test_conninfo.py:3:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_conninfo.py:4:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_conninfo.py:5:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_conninfo_attempts.py:6:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_conninfo_attempts.py:7:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_conninfo_attempts_async.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_conninfo_attempts_async.py:4:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_copy.py:12:8: Cannot resolve imported module `psycopg`
+ error[unresolved-attribute] tests/test_copy.py:71:18: Type `<module 'psycopg'>` has no attribute `rows`
+ error[invalid-argument-type] tests/test_copy.py:128:21: Argument to function `register_hstore` is incorrect: Expected `TypeInfo`, found `Unknown | None`
- error[unresolved-import] tests/test_copy.py:13:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_copy.py:14:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_copy.py:15:6: Cannot resolve imported module `psycopg.copy`
- error[unresolved-import] tests/test_copy.py:16:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_copy.py:17:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/test_copy.py:18:6: Cannot resolve imported module `psycopg.types.hstore`
- error[unresolved-import] tests/test_copy.py:19:6: Cannot resolve imported module `psycopg.types.numeric`
- error[unresolved-import] tests/test_copy.py:297:14: Cannot resolve imported module `psycopg.types.string`
- error[unresolved-import] tests/test_copy.py:299:14: Cannot resolve imported module `psycopg.types.string`
+ error[invalid-base] tests/test_copy.py:303:23: Invalid class base with type `<class 'StrDumper'> | <class 'StrBinaryDumper'>` (all bases must be a class, `Any`, `Unknown` or `Todo`)
+ error[unresolved-attribute] tests/test_copy.py:672:25: Type `<module 'psycopg'>` has no attribute `_copy`
- error[unresolved-import] tests/test_copy_async.py:9:8: Cannot resolve imported module `psycopg`
+ error[unresolved-attribute] tests/test_copy_async.py:60:18: Type `<module 'psycopg'>` has no attribute `rows`
- error[unresolved-import] tests/test_copy_async.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_copy_async.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_copy_async.py:12:6: Cannot resolve imported module `psycopg.copy`
- error[unresolved-import] tests/test_copy_async.py:13:6: Cannot resolve imported module `psycopg.adapt`
+ error[unresolved-attribute] tests/test_copy_async.py:73:18: Type `<module 'psycopg'>` has no attribute `rows`
- error[unresolved-import] tests/test_copy_async.py:14:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/test_copy_async.py:15:6: Cannot resolve imported module `psycopg.types.hstore`
- error[unresolved-import] tests/test_copy_async.py:16:6: Cannot resolve imported module `psycopg.types.numeric`
- error[unresolved-import] tests/test_copy_async.py:307:14: Cannot resolve imported module `psycopg.types.string`
- error[unresolved-import] tests/test_copy_async.py:309:14: Cannot resolve imported module `psycopg.types.string`
+ error[invalid-base] tests/test_copy_async.py:313:23: Invalid class base with type `<class 'StrDumper'> | <class 'StrBinaryDumper'>` (all bases must be a class, `Any`, `Unknown` or `Todo`)
+ error[unresolved-attribute] tests/test_copy_async.py:686:25: Type `<module 'psycopg'>` has no attribute `_copy_async`
- error[unresolved-import] tests/test_cursor.py:10:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor.py:12:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor.py:13:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_cursor_async.py:7:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_async.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_async.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_async.py:10:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_cursor_client.py:8:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_client.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_client_async.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_client_async.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_common.py:16:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_common.py:17:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_common.py:18:6: Cannot resolve imported module `psycopg.adapt`
+ error[unresolved-attribute] tests/test_cursor_common.py:180:17: Type `<module 'psycopg'>` has no attribute `_queries`
- error[unresolved-import] tests/test_cursor_common.py:19:6: Cannot resolve imported module `psycopg.types`
+ error[unresolved-attribute] tests/test_cursor_common.py:182:17: Type `<module 'psycopg'>` has no attribute `_queries`
+ error[unresolved-attribute] tests/test_cursor_common.py:202:29: Type `<module 'psycopg'>` has no attribute `adapt`
- error[unresolved-import] tests/test_cursor_common_async.py:13:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_common_async.py:14:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_common_async.py:15:6: Cannot resolve imported module `psycopg.adapt`
+ error[unresolved-attribute] tests/test_cursor_common_async.py:179:17: Type `<module 'psycopg'>` has no attribute `_queries`
- error[unresolved-import] tests/test_cursor_common_async.py:16:6: Cannot resolve imported module `psycopg.types`
+ error[unresolved-attribute] tests/test_cursor_common_async.py:181:17: Type `<module 'psycopg'>` has no attribute `_queries`
+ error[unresolved-attribute] tests/test_cursor_common_async.py:201:29: Type `<module 'psycopg'>` has no attribute `adapt`
- error[unresolved-import] tests/test_cursor_raw.py:6:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_raw.py:7:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_raw.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_raw.py:9:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_cursor_raw_async.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_raw_async.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_raw_async.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_raw_async.py:6:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_cursor_server.py:7:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_server.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_server.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_server_async.py:4:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_server_async.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_cursor_server_async.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_dns.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_dns.py:4:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_dns.py:25:12: Cannot resolve imported module `psycopg._dns`
- error[unresolved-import] tests/test_dns_srv.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_dns_srv.py:6:6: Cannot resolve imported module `psycopg.conninfo`
- warning[unused-ignore-comment] tests/test_dns_srv.py:51:48: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_dns_srv.py:60:60: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_dns_srv.py:75:43: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_dns_srv.py:84:55: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_dns_srv.py:91:33: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_dns_srv.py:105:39: Unused blanket `type: ignore` directive
- error[unresolved-import] tests/test_encodings.py:5:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_encodings.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_errors.py:9:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_errors.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_errors.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_errors.py:336:10: Cannot resolve imported module `psycopg.pq.misc`
- error[unresolved-import] tests/test_errors.py:351:10: Cannot resolve imported module `psycopg.pq.misc`
- error[unresolved-import] tests/test_generators.py:7:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_generators.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_generators.py:9:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_gevent.py:7:8: Cannot resolve imported module `psycopg`
+ error[unresolved-attribute] tests/test_gevent.py:61:8: Type `<module 'psycopg'>` has no attribute `waiting`
+ error[unresolved-attribute] tests/test_gevent.py:61:36: Type `<module 'psycopg'>` has no attribute `waiting`
+ error[unresolved-attribute] tests/test_gevent.py:76:8: Type `<module 'psycopg'>` has no attribute `waiting`
+ error[unresolved-attribute] tests/test_gevent.py:76:36: Type `<module 'psycopg'>` has no attribute `waiting`
+ error[unresolved-attribute] tests/test_module.py:21:20: Type `<module 'psycopg'>` has no attribute `generators`
+ error[unresolved-attribute] tests/test_module.py:31:25: Type `<module 'psycopg'>` has no attribute `generators`
- error[unresolved-import] tests/test_module.py:3:6: Cannot resolve imported module `psycopg._cmodule`
- error[unresolved-import] tests/test_module.py:4:6: Cannot resolve imported module `psycopg.conninfo`
- error[unresolved-import] tests/test_module.py:19:12: Cannot resolve imported module `psycopg.connection`
- error[unresolved-import] tests/test_notify.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_notify_async.py:7:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_pipeline.py:13:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_pipeline.py:14:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_pipeline.py:15:6: Cannot resolve imported module `psycopg`
+ error[unresolved-attribute] tests/test_pipeline.py:442:24: Type `<module 'psycopg'>` has no attribute `errors`
+ error[unresolved-attribute] tests/test_pipeline.py:446:24: Type `<module 'psycopg'>` has no attribute `errors`
- error[unresolved-import] tests/test_pipeline_async.py:10:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_pipeline_async.py:11:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_pipeline_async.py:12:6: Cannot resolve imported module `psycopg`
+ error[unresolved-attribute] tests/test_pipeline_async.py:441:24: Type `<module 'psycopg'>` has no attribute `errors`
+ error[unresolved-attribute] tests/test_pipeline_async.py:445:24: Type `<module 'psycopg'>` has no attribute `errors`
- error[unresolved-import] tests/test_prepared.py:15:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_prepared.py:16:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/test_prepared.py:17:6: Cannot resolve imported module `psycopg.pq._debug`
- error[unresolved-import] tests/test_prepared_async.py:12:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_prepared_async.py:13:6: Cannot resolve imported module `psycopg.rows`
- error[unresolved-import] tests/test_prepared_async.py:14:6: Cannot resolve imported module `psycopg.pq._debug`
- error[unresolved-import] tests/test_psycopg_dbapi20.py:8:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_psycopg_dbapi20.py:9:6: Cannot resolve imported module `psycopg.conninfo`
+ error[unresolved-attribute] tests/test_psycopg_dbapi20.py:146:25: Type `<module 'psycopg'>` has no attribute `generators`
- error[unresolved-import] tests/test_query.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_query.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_query.py:5:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_query.py:6:6: Cannot resolve imported module `psycopg._queries`
- error[unresolved-import] tests/test_rows.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_rows.py:4:6: Cannot resolve imported module `psycopg`
+ error[no-matching-overload] tests/test_sql.py:182:36: No overload of function `__new__` matches arguments
+ error[no-matching-overload] tests/test_sql.py:203:36: No overload of function `__new__` matches arguments
- error[unresolved-import] tests/test_sql.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_sql.py:11:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/test_sql.py:12:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/test_sql.py:13:6: Cannot resolve imported module `psycopg._encodings`
- error[unresolved-import] tests/test_sql.py:14:6: Cannot resolve imported module `psycopg.types.string`
- warning[unused-ignore-comment] tests/test_sql.py:250:33: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_sql.py:252:52: Unused blanket `type: ignore` directive
+ warning[possibly-unbound-attribute] tests/test_sql.py:424:19: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_sql.py:430:9: Attribute `register` on type `Unknown | None` is possibly unbound
- warning[unused-ignore-comment] tests/test_sql.py:452:26: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/test_sql.py:454:45: Unused blanket `type: ignore` directive
- error[unresolved-import] tests/test_tpc.py:6:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_tpc.py:7:6: Cannot resolve imported module `psycopg.pq`
+ error[unresolved-attribute] tests/test_tpc.py:284:28: Type `<module 'psycopg'>` has no attribute `rows`
- error[unresolved-import] tests/test_tpc_async.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_tpc_async.py:4:6: Cannot resolve imported module `psycopg.pq`
+ error[unresolved-attribute] tests/test_tpc_async.py:292:29: Type `<module 'psycopg'>` has no attribute `rows`
- error[unresolved-import] tests/test_transaction.py:8:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_transaction.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_transaction.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_transaction_async.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_transaction_async.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_transaction_async.py:7:6: Cannot resolve imported module `psycopg`
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:35:12: Attribute `name` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:39:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:40:12: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:41:12: Attribute `regtype` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/test_typeinfo.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_typeinfo.py:4:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_typeinfo.py:5:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/test_typeinfo.py:6:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/test_typeinfo.py:7:6: Cannot resolve imported module `psycopg.types.enum`
- error[unresolved-import] tests/test_typeinfo.py:8:6: Cannot resolve imported module `psycopg.types.range`
- error[unresolved-import] tests/test_typeinfo.py:9:6: Cannot resolve imported module `psycopg.types.composite`
- error[unresolved-import] tests/test_typeinfo.py:10:6: Cannot resolve imported module `psycopg.types.multirange`
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:143:12: Attribute `name` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:151:31: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/test_typeinfo.py:151:41: Attribute `array_oid` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/test_waiting.py:8:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_waiting.py:9:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/test_waiting.py:10:6: Cannot resolve imported module `psycopg.pq`
+ warning[possibly-unbound-attribute] tests/types/test_array.py:158:5: Attribute `register` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/test_windows.py:6:6: Cannot resolve imported module `psycopg.errors`
- error[unresolved-import] tests/test_xid.py:1:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_array.py:10:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_array.py:11:8: Cannot resolve imported module `psycopg.types.numeric`
- error[unresolved-import] tests/types/test_array.py:12:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_array.py:13:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_array.py:14:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/types/test_array.py:15:6: Cannot resolve imported module `psycopg.postgres`
- error[unresolved-import] tests/types/test_array.py:16:6: Cannot resolve imported module `psycopg.types.array`
+ error[invalid-argument-type] tests/types/test_array.py:360:24: Argument to function `register_array` is incorrect: Expected `TypeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:66:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:81:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:114:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:118:10: Attribute `python_type` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/types/test_bool.py:3:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_bool.py:4:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_bool.py:5:6: Cannot resolve imported module `psycopg.postgres`
- error[unresolved-import] tests/types/test_composite.py:3:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_composite.py:4:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_composite.py:5:6: Cannot resolve imported module `psycopg.postgres`
- error[unresolved-import] tests/types/test_composite.py:6:6: Cannot resolve imported module `psycopg.types.range`
- error[unresolved-import] tests/types/test_composite.py:7:6: Cannot resolve imported module `psycopg.types.composite`
- error[unresolved-import] tests/types/test_composite.py:8:6: Cannot resolve imported module `psycopg.types.composite`
- warning[unused-ignore-comment] tests/types/test_composite.py:417:41: Unused blanket `type: ignore` directive
- error[unresolved-import] tests/types/test_datetime.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_datetime.py:7:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_datetime.py:134:14: Cannot resolve imported module `psycopg.types.datetime`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:196:12: Attribute `name` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:197:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:198:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:198:24: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:199:16: Attribute `field_names` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:200:16: Attribute `field_types` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:202:16: Attribute `field_names` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:203:16: Attribute `field_types` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:266:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:267:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:268:16: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:269:17: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:285:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:305:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:306:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:333:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:334:12: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:350:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:352:21: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:352:31: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:356:50: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:359:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:361:21: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:361:31: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:366:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:368:21: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:368:31: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:375:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:376:23: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:377:12: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:378:34: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:382:10: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:389:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:390:23: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:391:12: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:392:34: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:396:10: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:407:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:408:12: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:430:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_composite.py:431:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:432:11: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:432:25: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:446:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:447:11: Attribute `python_type` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_composite.py:473:24: Argument to function `register_composite` is incorrect: Expected `CompositeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_composite.py:474:11: Attribute `python_type` on type `Unknown | None` is possibly unbound
- error[unresolved-import] tests/types/test_enum.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_enum.py:6:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_enum.py:7:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_enum.py:8:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/types/test_enum.py:9:6: Cannot resolve imported module `psycopg.types.enum`
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:65:12: Attribute `name` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:66:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:67:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:67:24: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:68:16: Attribute `labels` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:69:12: Attribute `labels` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_enum.py:95:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:97:18: Attribute `labels` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_enum.py:112:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:114:18: Attribute `labels` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:116:40: Attribute `name` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_enum.py:127:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:130:18: Attribute `labels` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:132:40: Attribute `name` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_enum.py:142:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:157:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:170:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:237:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:241:36: Attribute `name` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_enum.py:251:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:262:5: Attribute `register` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_enum.py:265:36: Attribute `name` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_enum.py:277:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:300:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:313:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:327:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:343:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_enum.py:359:19: Argument to function `register_enum` is incorrect: Expected `EnumInfo`, found `Unknown | None`
- error[unresolved-import] tests/types/test_hstore.py:3:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_hstore.py:4:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/types/test_hstore.py:5:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/types/test_hstore.py:8:10: Cannot resolve imported module `psycopg.types.hstore`
- error[unresolved-import] tests/types/test_hstore.py:9:10: Cannot resolve imported module `psycopg.types.hstore`
+ error[invalid-argument-type] tests/types/test_hstore.py:96:21: Argument to function `register_hstore` is incorrect: Expected `TypeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_hstore.py:97:32: Attribute `oid` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_hstore.py:106:21: Argument to function `register_hstore` is incorrect: Expected `TypeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_hstore.py:107:36: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_hstore.py:108:31: Attribute `oid` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_hstore.py:116:21: Argument to function `register_hstore` is incorrect: Expected `TypeInfo`, found `Unknown | None`
+ warning[possibly-unbound-attribute] tests/types/test_hstore.py:117:35: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_hstore.py:119:39: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_hstore.py:121:32: Attribute `oid` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_hstore.py:135:21: Argument to function `register_hstore` is incorrect: Expected `TypeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_hstore.py:142:21: Argument to function `register_hstore` is incorrect: Expected `TypeInfo`, found `Unknown | None`
- error[unresolved-import] tests/types/test_json.py:6:8: Cannot resolve imported module `psycopg.types`
+ error[unresolved-attribute] tests/types/test_json.py:26:23: Type `<module 'psycopg.types'>` has no attribute `json`
- error[unresolved-import] tests/types/test_json.py:7:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_json.py:8:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_json.py:9:6: Cannot resolve imported module `psycopg.types.json`
+ error[unresolved-attribute] tests/types/test_json.py:39:23: Type `<module 'psycopg.types'>` has no attribute `json`
+ error[unresolved-attribute] tests/types/test_json.py:61:22: Type `<module 'psycopg.types'>` has no attribute `json`
+ error[unresolved-attribute] tests/types/test_json.py:83:23: Type `<module 'psycopg.types'>` has no attribute `json`
+ error[unresolved-attribute] tests/types/test_json.py:131:23: Type `<module 'psycopg.types'>` has no attribute `json`
+ error[unresolved-attribute] tests/types/test_json.py:146:23: Type `<module 'psycopg.types'>` has no attribute `json`
+ error[unresolved-attribute] tests/types/test_json.py:161:23: Type `<module 'psycopg.types'>` has no attribute `json`
+ error[unresolved-attribute] tests/types/test_json.py:176:23: Type `<module 'psycopg.types'>` has no attribute `json`
- error[unresolved-import] tests/types/test_multirange.py:7:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_multirange.py:8:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_multirange.py:9:6: Cannot resolve imported module `psycopg.types`
- error[unresolved-import] tests/types/test_multirange.py:10:6: Cannot resolve imported module `psycopg.types.range`
- error[unresolved-import] tests/types/test_multirange.py:11:6: Cannot resolve imported module `psycopg.types.multirange`
- warning[unused-ignore-comment] tests/types/test_multirange.py:42:40: Unused blanket `type: ignore` directive
- warning[unused-ignore-comment] tests/types/test_multirange.py:59:34: Unused blanket `type: ignore` directive
+ warning[possibly-unbound-attribute] tests/types/test_multirange.py:372:12: Attribute `name` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_multirange.py:373:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_multirange.py:374:12: Attribute `oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_multirange.py:374:24: Attribute `array_oid` on type `Unknown | None` is possibly unbound
+ warning[possibly-unbound-attribute] tests/types/test_multirange.py:375:12: Attribute `subtype_oid` on type `Unknown | None` is possibly unbound
+ error[invalid-argument-type] tests/types/test_multirange.py:397:25: Argument to function `register_multirange` is incorrect: Expected `MultirangeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_multirange.py:407:25: Argument to function `register_multirange` is incorrect: Expected `MultirangeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_multirange.py:419:25: Argument to function `register_multirange` is incorrect: Expected `MultirangeInfo`, found `Unknown | None`
+ error[invalid-argument-type] tests/types/test_multirange.py:432:25: Argument to function `register_multirange` is incorrect: Expected `MultirangeInfo`, found `Unknown | None`
- error[unresolved-import] tests/types/test_net.py:5:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_net.py:6:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_none.py:1:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_none.py:2:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_numeric.py:9:8: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_numeric.py:10:6: Cannot resolve imported module `psycopg`
- error[unresolved-import] tests/types/test_numeric.py:11:6: Cannot resolve imported module `psycopg.abc`
- error[unresolved-import] tests/types/test_numeric.py:12:6: Cannot resolve imported module `psycopg.adapt`
- error[unresolved-import] tests/types/test_numeric.py:13:6: Cannot resolve imported module `psycopg.types.numeric`
- warning[unused-ignore-comment] tests/types/test_numeric.py:82:28: Unused blanket `type: ignore` directive
- error[unresolved-import] tests/types/test_numpy.py:7:6: Cannot resolve imported module `psycopg.pq`
- error[unresolved-import] tests/types/test_numpy.py:8:6: Canno...*[Comment body truncated]*

@MichaReiser MichaReiser marked this pull request as ready for review May 17, 2025 16:15
@MichaReiser MichaReiser force-pushed the micha/project-name branch from 6cfa747 to 74d5f25 Compare May 17, 2025 16:25
@MichaReiser
Copy link
Member Author

MichaReiser commented May 17, 2025

  • Found 797 diagnostics
  • Found 646 diagnostics

There are no other changes to mypy primer, so maybe it's not worth changing the default just for one project. I'd be interested to hear from people with more knowledge of the Python ecosystem to hear how common this project structure is.

@MichaReiser
Copy link
Member Author

I think we should fix this for this specific mypy primer project for now. We can consider changing our heuristics if this comes up more frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration ty Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant