Skip to content

Commit

Permalink
Ignore unsupported mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
LeMyst committed Apr 24, 2023
1 parent 3ebf4ac commit 7dfd46b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions wikibaseintegrator/entities/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, labels: Optional[Labels] = None, descriptions: Optional[Descr
# Item specific
self.sitelinks = sitelinks or Sitelinks()

@BaseEntity.id.setter
@BaseEntity.id.setter # type: ignore
def id(self, value: Union[None, str, int]):
if isinstance(value, str):
pattern = re.compile(r'^(?:[a-zA-Z]+:)?Q?([0-9]+)$')
Expand All @@ -51,7 +51,7 @@ def id(self, value: Union[None, str, int]):
else:
raise ValueError(f"Invalid item ID ({value}), format must be 'Q[0-9]+'")

BaseEntity.id.fset(self, value)
BaseEntity.id.fset(self, value) # type: ignore

@property
def labels(self) -> Labels:
Expand Down
4 changes: 2 additions & 2 deletions wikibaseintegrator/entities/lexeme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, lemmas: Optional[Lemmas] = None, lexical_category: Optional[s
self.forms: Forms = forms or Forms()
self.senses: Senses = senses or Senses()

@BaseEntity.id.setter
@BaseEntity.id.setter # type: ignore
def id(self, value: Union[None, str, int]):
if isinstance(value, str):
pattern = re.compile(r'^(?:[a-zA-Z]+:)?L?([0-9]+)$')
Expand All @@ -39,7 +39,7 @@ def id(self, value: Union[None, str, int]):
else:
raise ValueError(f"Invalid lexeme ID ({value}), format must be 'L[0-9]+'")

BaseEntity.id.fset(self, value)
BaseEntity.id.fset(self, value) # type: ignore

@property
def lemmas(self) -> Lemmas:
Expand Down
4 changes: 2 additions & 2 deletions wikibaseintegrator/entities/mediainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, labels: Optional[Labels] = None, descriptions: Optional[Descr
self.descriptions: LanguageValues = descriptions or Descriptions()
self.aliases = aliases or Aliases()

@BaseEntity.id.setter
@BaseEntity.id.setter # type: ignore
def id(self, value: Union[None, str, int]):
if isinstance(value, str):
pattern = re.compile(r'^M?([0-9]+)$')
Expand All @@ -48,7 +48,7 @@ def id(self, value: Union[None, str, int]):
else:
raise ValueError(f"Invalid MediaInfo ID ({value}), format must be 'M[0-9]+'")

BaseEntity.id.fset(self, value)
BaseEntity.id.fset(self, value) # type: ignore

@property
def labels(self) -> Labels:
Expand Down
4 changes: 2 additions & 2 deletions wikibaseintegrator/entities/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, datatype: Union[str, WikibaseDatatype, None] = None, labels:
self.descriptions: Descriptions = descriptions or Descriptions()
self.aliases = aliases or Aliases()

@BaseEntity.id.setter
@BaseEntity.id.setter # type: ignore
def id(self, value: Union[None, str, int]):
if isinstance(value, str):
pattern = re.compile(r'^(?:[a-zA-Z]+:)?P?([0-9]+)$')
Expand All @@ -41,7 +41,7 @@ def id(self, value: Union[None, str, int]):
else:
raise ValueError(f"Invalid property ID ({value}), format must be 'P[0-9]+'")

BaseEntity.id.fset(self, value)
BaseEntity.id.fset(self, value) # type: ignore

@property
def datatype(self) -> Union[str, WikibaseDatatype, None]:
Expand Down

0 comments on commit 7dfd46b

Please sign in to comment.