Skip to content

Commit ef8497d

Browse files
committed
Remove type ignore statements
1 parent 030e9bd commit ef8497d

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

src/posit/connect/content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def restart(self) -> None:
228228
f"Restart not supported for this application mode: {self['app_mode']}. Did you need to use the 'render()' method instead? Note that some application modes do not support 'render()' or 'restart()'.",
229229
)
230230

231-
def update( # type: ignore[reportIncompatibleMethodOverride]
231+
def update(
232232
self,
233233
**attrs: Unpack[ContentItem._Attrs],
234234
) -> None:

src/posit/connect/metrics/usage.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,7 @@ def find(self, **kwargs) -> List[UsageEvent]:
199199
for finder in finders:
200200
instance = finder(self._ctx)
201201
events.extend(
202-
[
203-
UsageEvent.from_event(event)
204-
for event in instance.find(**kwargs) # type: ignore[attr-defined]
205-
],
202+
[UsageEvent.from_event(event) for event in instance.find(**kwargs)],
206203
)
207204
return events
208205

@@ -252,7 +249,7 @@ def find_one(self, **kwargs) -> UsageEvent | None:
252249
finders = (visits.Visits, shiny_usage.ShinyUsage)
253250
for finder in finders:
254251
instance = finder(self._ctx)
255-
event = instance.find_one(**kwargs) # type: ignore[attr-defined]
252+
event = instance.find_one(**kwargs)
256253
if event:
257254
return UsageEvent.from_event(event)
258255
return None

src/posit/connect/resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(self, ctx: Context, path: str, **attributes):
8585
def destroy(self) -> None:
8686
self._ctx.client.delete(self._path)
8787

88-
def update(self, **attributes): # type: ignore[reportIncompatibleMethodOverride]
88+
def update(self, **attributes): # pyright: ignore[reportIncompatibleMethodOverride]
8989
response = self._ctx.client.put(self._path, json=attributes)
9090
result = response.json()
9191
super().update(**result)

src/posit/connect/tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def update(self, /, *, name: str = ..., parent: Tag | None = ...) -> None: ...
167167
@overload
168168
def update(self, /, *, name: str = ..., parent_id: str | None = ...) -> None: ...
169169

170-
def update( # pyright: ignore[reportIncompatibleMethodOverride] ; This method returns `Tag`. Parent method returns `None`
170+
def update(
171171
self,
172172
**kwargs,
173173
) -> None:

tests/posit/connect/test_packages.py

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

33
from posit.connect.client import Client
44

5-
from .api import load_mock # type: ignore
5+
from .api import load_mock
66

77

88
class TestPackagesFindBy:

0 commit comments

Comments
 (0)