• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alorence / django-modern-rpc / 23174233494

17 Mar 2026 01:34AM UTC coverage: 98.865%. Remained the same
23174233494

Pull #144

github

web-flow
Bump ty from 0.0.22 to 0.0.23

Bumps [ty](https://github.com/astral-sh/ty) from 0.0.22 to 0.0.23.
- [Release notes](https://github.com/astral-sh/ty/releases)
- [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ty/compare/0.0.22...0.0.23)

---
updated-dependencies:
- dependency-name: ty
  dependency-version: 0.0.23
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #144: Bump ty from 0.0.22 to 0.0.23

83 of 84 branches covered (98.81%)

1394 of 1410 relevant lines covered (98.87%)

17.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
modernrpc/compat.py
1
import sys
18✔
2
import types
18✔
3
import typing
18✔
4

5
import django
18✔
6
from django.views.decorators.csrf import csrf_exempt
18✔
7

8
if sys.version_info >= (3, 11):
18✔
9
    from typing import Self
14✔
10
else:
11
    from typing_extensions import Self  # noqa: F401
4✔
12

13

14
if django.VERSION >= (5, 0):
18✔
15
    # Django updated its decorators to support wrapping asynchronous method in release 5.0
16
    # REF: https://docs.djangoproject.com/en/5.2/releases/5.0/#decorators
17

18
    async_csrf_exempt = csrf_exempt
15✔
19

20
else:
21
    # Fore Django version < 5.0, we partially redefine decorators to support async view
22

23
    def async_csrf_exempt(view):
3✔
24
        view.csrf_exempt = True
3✔
25
        return view
3✔
26

27

28
if sys.version_info >= (3, 14):
18✔
29

30
    def is_union_type(_type) -> bool:
2✔
31
        return isinstance(_type, types.UnionType)
2✔
32

33
else:
34

35
    def is_union_type(_type) -> bool:
16✔
36
        return typing.get_origin(_type) in (types.UnionType, typing.Union)
16✔
37

38

39
if sys.version_info >= (3, 14):
18✔
40

41
    def union_str_repr(obj: typing.Any) -> str:
2✔
42
        return str(obj)
2✔
43

44
else:
45

46
    def union_str_repr(obj: typing.Any) -> str:
16✔
47
        return " | ".join(t.__name__ for t in typing.get_args(obj))
16✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc