Skip to content

Commit

Permalink
include bad types to make sure the type checker is actually working
Browse files Browse the repository at this point in the history
  • Loading branch information
keepingitneil committed Mar 19, 2024
1 parent 32be456 commit 5b244d1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: python -m pip install ./livekit-api ./livekit-protocol ./livekit-rtc

- name: Check Types
run: python -m mypy -p 'livekit-protocol' -p 'livekit-api' -p 'livekit-rtc'
run: python -m mypy --install-type --non-interactive -p 'livekit-protocol' -p 'livekit-api' -p 'livekit-rtc'
2 changes: 2 additions & 0 deletions livekit-api/livekit/api/access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import jwt
from typing import Optional, List

bad_type: str = 5

DEFAULT_TTL = datetime.timedelta(hours=6)
DEFAULT_LEEWAY = datetime.timedelta(minutes=1)

Expand Down
2 changes: 2 additions & 0 deletions livekit-protocol/livekit/protocol/agent.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti

DESCRIPTOR: _descriptor.FileDescriptor

bad_type: str = 5

class JobType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = ()
JT_ROOM: _ClassVar[JobType]
Expand Down
2 changes: 2 additions & 0 deletions livekit-rtc/livekit/rtc/audio_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from ._utils import get_address
from typing import Union

bad_type: str = 5


class AudioFrame:
def __init__(
Expand Down

0 comments on commit 5b244d1

Please sign in to comment.