Skip to content

Commit

Permalink
Better typing for ObjType
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Aug 16, 2024
1 parent f9b3355 commit c9d3414
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sphinx/domains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ class ObjType:
'searchprio': 1,
}

def __init__(self, lname: str, *roles: Any, **attrs: Any) -> None:
self.lname = lname
self.roles: tuple = roles
self.attrs: dict = self.known_attrs.copy()
self.attrs.update(attrs)
def __init__(self, lname: str, /, *roles: Any, **attrs: Any) -> None:
self.lname: str = lname
self.roles: tuple[Any, ...] = roles
self.attrs: dict[str, Any] = self.known_attrs | attrs


class Domain:
Expand Down

0 comments on commit c9d3414

Please sign in to comment.