Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: inline generated DataCategory constants (#2389)
this allows mypy to type check this enum this is what it looks like when it fails: ```console $ python3 -c 'import sentry_relay.consts' Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/asottile/workspace/relay/py/sentry_relay/__init__.py", line 22, in <module> _import_all() File "/Users/asottile/workspace/relay/py/sentry_relay/__init__.py", line 11, in _import_all mod = __import__("sentry_relay.%s" % modname, glob, glob, ["__name__"]) File "/Users/asottile/workspace/relay/py/sentry_relay/consts.py", line 78, in <module> _check_generated() File "/Users/asottile/workspace/relay/py/sentry_relay/consts.py", line 72, in _check_generated raise AssertionError( AssertionError: DataCategory enum does not match source! Paste this into `class DataCategory` in pysentry_relay/consts.py: DEFAULT = 0 ERROR = 1 TRANSACTION = 2 SECURITY = 3 ATTACHMENT = 4 SESSION = 5 PROFILE = 6 REPLAY = 7 TRANSACTION_PROCESSED = 8 TRANSACTION_INDEXED = 9 MONITOR = 10 PROFILE_INDEXED = 11 SPAN = 12 UNKNOWN = -1 ``` #skip-changelog
- Loading branch information