File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 3737 - id : mypy
3838 additional_dependencies :
3939 - pytest
40- - sqlalchemy
41- - sqlalchemy2-stubs
40+ - sqlalchemy[mypy]
4241
4342 - repo : https://github.com/pre-commit/pygrep-hooks
4443 rev : v1.9.0
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ max_line_length = 99
7474python_version = " 3.7"
7575strict = true
7676ignore_missing_imports = true
77+ plugins = [" sqlalchemy.ext.mypy.plugin" ]
7778
7879[tool .pytest .ini_options ]
7980addopts = " -rsx --tb=short"
Original file line number Diff line number Diff line change 33import argparse
44import sys
55from contextlib import ExitStack
6+ from typing import TextIO
67
78from sqlalchemy .engine import create_engine
89from sqlalchemy .schema import MetaData
@@ -63,6 +64,7 @@ def main() -> None:
6364
6465 # Open the target file (if given)
6566 with ExitStack () as stack :
67+ outfile : TextIO
6668 if args .outfile :
6769 outfile = open (args .outfile , "w" , encoding = "utf-8" )
6870 stack .enter_context (outfile )
Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ def uses_default_name(constraint: Constraint | Index) -> bool:
7777 values .update (
7878 {
7979 "column_0_name" : constraint .columns [0 ].name , # type: ignore[index]
80- "column_0_label" : constraint .columns [0 ]
80+ "column_0_label" : constraint .columns [0 ] # type: ignore[index]
8181 .label (constraint .columns [0 ].name ) # type: ignore[index]
82- .name , # type: ignore[index]
82+ .name ,
8383 "column_0_key" : constraint .columns [0 ].key , # type: ignore[index]
8484 }
8585 )
You can’t perform that action at this time.
0 commit comments