Skip to content

Commit de90c37

Browse files
committed
Add type annotations
1 parent 7f4abb2 commit de90c37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bpython/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838

3939
class UnknownColorCode(Exception):
40-
def __init__(self, key, color):
40+
def __init__(self, key: str, color: str) -> None:
4141
self.key = key
4242
self.color = color
4343

bpython/inspection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
from pygments.token import Token
3131
from pygments.lexers import Python3Lexer
32+
from typing import Any
3233
from types import MemberDescriptorType
3334

3435
from .lazyre import LazyReCompile
@@ -53,7 +54,7 @@ class AttrCleaner:
5354
"""A context manager that tries to make an object not exhibit side-effects
5455
on attribute lookup."""
5556

56-
def __init__(self, obj):
57+
def __init__(self, obj: Any) -> None:
5758
self.obj = obj
5859

5960
def __enter__(self):

0 commit comments

Comments
 (0)