freezegun icon indicating copy to clipboard operation
freezegun copied to clipboard

Add FakeDate to stubs

Open srittau opened this issue 2 years ago • 1 comments

I'm using pysqlite3 instead of the built-in sqlite3 module, since I need newer features. Therefore I need to register FakeDate manually as an adapter for pysqlite3. Unfortunately, since FakeDate is not defined in freezegun/api.pyi, my type checkers complain about it. It would be useful to include FakeDate (and potentially other fake classes) in the type stubs.

srittau avatar Jan 26 '23 14:01 srittau

Hey,

I second this. My use case is, that I write a custom representer for FakeDate in pyyaml.

Thanks a lot for this really cool project :+1:

finswimmer avatar May 15 '23 08:05 finswimmer

Freezegun 1.5.0 has proper (in-line) typing support, so I believe this is fixed.

bblommers avatar May 11 '24 17:05 bblommers