We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mypy 1.14 raises this error for this code, bisected to c407a44, presumably for the same reason as #12808 and #3613.
error: Argument 2 to "register_dialect" has incompatible type "type[TestDialect]"; expected "type[Dialect]" [arg-type]
This diff solves my use case:
diff --git a/mypy/typeshed/stdlib/_csv.pyi b/mypy/typeshed/stdlib/_csv.pyi index 0e206a63b..21bf52303 100644 --- a/mypy/typeshed/stdlib/_csv.pyi +++ b/mypy/typeshed/stdlib/_csv.pyi @@ -85,7 +85,7 @@ def reader( ) -> _reader: ... def register_dialect( name: str, - dialect: type[Dialect] = ..., + dialect: type[Dialect | csv.Dialect] = ..., *, delimiter: str = ",", quotechar: str | None = '"',
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
mypy 1.14 raises this error for this code, bisected to c407a44, presumably for the same reason as #12808 and #3613.
This diff solves my use case:
The text was updated successfully, but these errors were encountered: