Skip to content

Add better typings plus test for transaction.atomic. #23

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

Merged

Conversation

syastrov
Copy link
Contributor

  • All cases are handled, including bare decorator (@transaction.atomic).
  • Decorated function's signature is preserved when type-checking.

@mkurnikov
Copy link
Member

Thank you very much for the PR!

Tests for the plugin are extremely slow now, mypy need to load lots of stuff in memory on every test. Could you combine all three your tests into a big one?

@syastrov syastrov force-pushed the better-types-for-transaction-atomic branch from 97b651c to ad9363c Compare February 19, 2019 16:24
@syastrov
Copy link
Contributor Author

You are welcome.

I've merged the tests into one. And I removed some stuff that shouldn't have been in the changes that caused failing tests.

I have force-pushed my changes.

@mkurnikov
Copy link
Member

Looks really good, run black on it so CI would pass (see command in reformat.xsh) and I'll merge.

- All cases are handled, including bare decorator (@transaction.atomic).
- Decorated function's signature is preserved when type-checking.
@syastrov syastrov force-pushed the better-types-for-transaction-atomic branch from ad9363c to 67c9943 Compare February 20, 2019 05:40
@mkurnikov mkurnikov merged commit 194258a into typeddjango:master Feb 20, 2019
@TonyRippy TonyRippy mentioned this pull request Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants