File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ The library is built with modern Python practices (3.13+) and uses type hints ex
2020- ** uv** for package management and building
2121- ** Docker** for development and testing environments
2222- ** pytest** for testing
23- - ** ruff** and ** mypy ** for linting and type checking
23+ - ** ruff** and ** ty ** for linting and type checking
2424
2525## Project Structure
2626
@@ -112,7 +112,7 @@ The library can be configured using environment variables:
112112
113113## Development Conventions
114114
115- 1 . ** Type Safety** : Strict mypy checking is enforced
115+ 1 . ** Type Safety** : Strict ty checking is enforced
1161162 . ** Code Style** : Ruff is used for linting with specific rules configured
1171173 . ** Testing** : All functionality should have corresponding tests
1181184 . ** Async/Await** : All database operations are asynchronous
Original file line number Diff line number Diff line change @@ -20,13 +20,13 @@ lint:
2020 uv run eof-fixer .
2121 uv run ruff format
2222 uv run ruff check --fix
23- uv run mypy .
23+ uv run ty check
2424
2525lint-ci :
2626 uv run eof-fixer . --check
2727 uv run ruff format --check
2828 uv run ruff check --no-fix
29- uv run mypy .
29+ uv run ty check
3030
3131publish :
3232 rm -rf dist
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def build_connection_factory(
2020 url : sqlalchemy .URL ,
2121 timeout : float ,
2222) -> typing .Callable [[], typing .Awaitable ["ConnectionType" ]]:
23- connect_args : typing .Final [dict [str , typing .Any ]] = PGDialect_asyncpg ().create_connect_args (url )[1 ] # type: ignore[no-untyped-call]
23+ connect_args : typing .Final [dict [str , typing .Any ]] = PGDialect_asyncpg ().create_connect_args (url )[1 ]
2424 raw_target_session_attrs : typing .Final [str | None ] = connect_args .pop ("target_session_attrs" , None )
2525 target_session_attrs : typing .Final [SessionAttribute | None ] = (
2626 SessionAttribute (raw_target_session_attrs ) if raw_target_session_attrs else None
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def postgres_retry[**P, T](
3333 wait = tenacity .wait_exponential_jitter (),
3434 retry = tenacity .retry_if_exception (_retry_handler ),
3535 reraise = True ,
36- before = tenacity .before_log (logger , logging .DEBUG ),
36+ before = tenacity .before_log (logger , logging .DEBUG ), # ty: ignore[invalid-argument-type]
3737 )
3838 @functools .wraps (func )
3939 async def wrapped_method (* args : P .args , ** kwargs : P .kwargs ) -> T :
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ dev = [
3636]
3737lint = [
3838 " ruff" ,
39- " mypy " ,
39+ " ty " ,
4040 " eof-fixer" ,
4141 " asyncpg-stubs" ,
4242]
@@ -49,10 +49,6 @@ build-backend = "uv_build"
4949module-name = " db_retry"
5050module-root = " "
5151
52- [tool .mypy ]
53- python_version = " 3.13"
54- strict = true
55-
5652[tool .ruff ]
5753fix = false
5854unsafe-fixes = true
You can’t perform that action at this time.
0 commit comments