File: _union_type.py

package info (click to toggle)
python-typish 1.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: python: 1,632; makefile: 2
file content (7 lines) | stat: -rw-r--r-- 178 bytes parent folder | download
1
2
3
4
5
6
7
class _UnionType(type):
    def __instancecheck__(self, instance):
        return str(instance).startswith('typing.Union')


class UnionType(type, metaclass=_UnionType):
    ...