-
Notifications
You must be signed in to change notification settings - Fork 88
Adding support for modern type-hints #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| except (AttributeError, TypeError): | ||
| # If typing helpers fail, we'll handle through other means | ||
| origin = None | ||
| args = [] |
Check notice
Code scanning / CodeQL
Unused local variable Note
This autofix suggestion was applied.
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the assignment of the args variable on line 251. Since the right-hand side of the assignment (typing.get_args(class_obj)) does not have any side effects, we can safely remove the entire line without affecting the functionality of the code. This will eliminate the unused local variable and clean up the code.
-
Copy modified line R251
| @@ -250,3 +250,3 @@ | ||
| origin = typing.get_origin(class_obj) | ||
| args = typing.get_args(class_obj) | ||
|
|
||
| except (AttributeError, TypeError): |
47b696d to
eeb2184
Compare
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Marc Romeyn <marcromeyn@gmail.com>
Signed-off-by: Marc Romeyn <marcromeyn@gmail.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
2e037b9 to
8acfeb0
Compare
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
Signed-off-by: Marc Romeyn <mromeijn@nvidia.com>
|
relate to #178 which is merged. |
I noticed that this command in nemo is broken currently, this PR should fix it: