Repository: Pycord-Development/pycord

Issue:
mypy CI is not working!
### Summary

github workflow's mypy CI is not working. All errors, including fatal, are ignored.

### Reproduction Steps

You can see in the latest github workflow log.
<https://github.com/Pycord-Development/pycord/runs/4812755113?check_suite_focus=true>

```log
Run mypy --ignore-missing-imports --install-types --non-interactive . || true
  mypy --ignore-missing-imports --install-types --non-interactive . || true
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.1/x64/lib
discord/commands/core.py:167: error: Invalid "type: ignore" comment
Found 5 errors in 1 file (errors prevented further checking)
discord/commands/core.py:186: error: Invalid "type: ignore" comment
discord/commands/core.py:193: error: Invalid "type: ignore" comment
discord/commands/core.py:229: error: Invalid "type: ignore" comment
discord/commands/core.py:632: error: Invalid "type: ignore" comment
```

This is also checked on my envirnment.
( `pip install mypy` , mypy version is 0.931 )

```sh
pip install mypy
```

```sh
 % mypy --version
mypy 0.931
```

Run mypy

```sh
 % mkdir --parents --verbose .mypy_cache
 % mypy --ignore-missing-imports --install-types --non-interactive .
```


### Minimal Reproducible Code

_No response_

### Expected Results


```sh
 % mypy --ignore-missing-imports --install-types --non-interactive .
Success: no issues found in 152 source files
```

### Actual Results

<https://github.com/Pycord-Development/pycord/runs/4812755113?check_suite_focus=true>

![image](https://user-images.githubusercontent.com/33354327/149532882-62f6b6c7-9b92-43b0-ab09-6e9829097fd3.png)


```sh
 % mypy --ignore-missing-imports --install-types --non-interactive .
discord/commands/core.py:167: error: Invalid "type: ignore" comment
discord/commands/core.py:186: error: Invalid "type: ignore" comment
discord/commands/core.py:193: error: Invalid "type: ignore" comment
discord/commands/core.py:229: error: Invalid "type: ignore" comment
discord/commands/core.py:632: error: Invalid "type: ignore" comment
Found 5 errors in 1 file (errors prevented further checking)
```

### Intents

Not bot issue

### System Information


```sh
 % python -m discord -v
- Python v3.8.12-final
- py-cord v2.0.0-alpha
    - py-cord pkg_resources: v2.0.0a4793+gf8832608
- aiohttp v3.8.1
- system info: Linux 5.11.0-46-generic #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022
```

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.

### Additional Context

_No response_


Discussion:

Resolving patch:
diff --git a/discord/commands/core.py b/discord/commands/core.py
--- a/discord/commands/core.py
+++ b/discord/commands/core.py
@@ -164,7 +164,7 @@ async def __call__(self, ctx, *args, **kwargs):
     def _prepare_cooldowns(self, ctx: ApplicationContext):
         if self._buckets.valid:
             current = datetime.datetime.now().timestamp()
-            bucket = self._buckets.get_bucket(ctx, current)  # type: ignore (ctx instead of non-existent message)
+            bucket = self._buckets.get_bucket(ctx, current)  # type: ignore # ctx instead of non-existent message
 
             if bucket is not None:
                 retry_after = bucket.update_rate_limit(current)
@@ -183,14 +183,14 @@ async def prepare(self, ctx: ApplicationContext) -> None:
         if hasattr(self, "_max_concurrency"):
             if self._max_concurrency is not None:
                 # For this application, context can be duck-typed as a Message
-                await self._max_concurrency.acquire(ctx)  # type: ignore (ctx instead of non-existent message)
+                await self._max_concurrency.acquire(ctx)  # type: ignore # ctx instead of non-existent message
 
             try:
                 self._prepare_cooldowns(ctx)
                 await self.call_before_hooks(ctx)
             except:
                 if self._max_concurrency is not None:
-                    await self._max_concurrency.release(ctx)  # type: ignore (ctx instead of non-existent message)
+                    await self._max_concurrency.release(ctx)  # type: ignore # ctx instead of non-existent message
                 raise
 
     def is_on_cooldown(self, ctx: ApplicationContext) -> bool:
@@ -226,7 +226,7 @@ def reset_cooldown(self, ctx: ApplicationContext) -> None:
             The invocation context to reset the cooldown under.
         """
         if self._buckets.valid:
-            bucket = self._buckets.get_bucket(ctx)  # type: ignore (ctx instead of non-existent message)
+            bucket = self._buckets.get_bucket(ctx)  # type: ignore # ctx instead of non-existent message
             bucket.reset()
 
     def get_cooldown_retry_after(self, ctx: ApplicationContext) -> float:
@@ -630,7 +630,7 @@ def _match_option_param_names(self, params, options):
         check_annotations = [
             lambda o, a: o.input_type == SlashCommandOptionType.string and o.converter is not None,  # pass on converters
             lambda o, a: isinstance(o.input_type, SlashCommandOptionType),  # pass on slash cmd option type enums
-            lambda o, a: isinstance(o._raw_type, tuple) and a == Union[o._raw_type],  # type: ignore (union types)
+            lambda o, a: isinstance(o._raw_type, tuple) and a == Union[o._raw_type],  # type: ignore # union types
             lambda o, a: self._is_typing_optional(a) and not o.required and o._raw_type in a.__args__,  # optional
             lambda o, a: inspect.isclass(a) and issubclass(a, o._raw_type)  # 'normal' types
         ]


Test patch: