diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 112b3eb07..a0a537b09 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,7 +33,7 @@ jobs: - name: Run Pyright uses: jakebailey/pyright-action@v1 with: - version: '1.1.265' + version: '1.1.289' warnings: false no-comments: ${{ matrix.python-version != '3.x' }} diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 782d664ba..4fecab401 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -451,11 +451,11 @@ class Command(_BaseCommand, Generic[CogT, P, T]): self.require_var_positional: bool = kwargs.get('require_var_positional', False) self.ignore_extra: bool = kwargs.get('ignore_extra', True) self.cooldown_after_parsing: bool = kwargs.get('cooldown_after_parsing', False) - self.cog: CogT = None + self.cog: CogT = None # type: ignore # This breaks every other pyright release # bandaid for the fact that sometimes parent can be the bot instance parent: Optional[GroupMixin[Any]] = kwargs.get('parent') - self.parent: Optional[GroupMixin[Any]] = parent if isinstance(parent, _BaseCommand) else None + self.parent: Optional[GroupMixin[Any]] = parent if isinstance(parent, _BaseCommand) else None # type: ignore # Does not recognise mixin usage self._before_invoke: Optional[Hook] = None try: diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 335d3affc..9a3db53a6 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -619,7 +619,7 @@ class Loop(Generic[LF]): if not inspect.iscoroutinefunction(coro): raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__!r}.') - self._error = coro + self._error = coro # type: ignore return coro def _get_next_sleep_time(self, now: datetime.datetime = MISSING) -> datetime.datetime: diff --git a/discord/file.py b/discord/file.py index fcd847455..abb8e707b 100644 --- a/discord/file.py +++ b/discord/file.py @@ -112,7 +112,7 @@ class File: else: filename = getattr(fp, 'name', 'untitled') - self._filename, filename_spoiler = _strip_spoiler(filename) # type: ignore # the above getattr doesn't narrow the type + self._filename, filename_spoiler = _strip_spoiler(filename) if spoiler is MISSING: spoiler = filename_spoiler