File: abstracttype.py

package info (click to toggle)
python-graphene 2.1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,024 kB
  • sloc: python: 7,295; makefile: 196; sh: 4
file content (11 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from ..utils.deprecated import warn_deprecation
from ..utils.subclass_with_meta import SubclassWithMeta


class AbstractType(SubclassWithMeta):
    def __init_subclass__(cls, *args, **kwargs):
        warn_deprecation(
            "Abstract type is deprecated, please use normal object inheritance instead.\n"
            "See more: https://github.com/graphql-python/graphene/blob/master/UPGRADE-v2.0.md#deprecations"
        )
        super(AbstractType, cls).__init_subclass__(*args, **kwargs)