-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Script
class defined twice
#3332
Comments
kurtmckee
added a commit
to kurtmckee/pr-redis-py
that referenced
this issue
Jul 23, 2024
The type annotations are copied to the second definition, and the mutable default arguments to the `keys` and `args` parameters are replaced with `None`, as is best-practice. Closes redis#3332
kurtmckee
added a commit
to kurtmckee/pr-redis-py
that referenced
this issue
Jul 23, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes redis#3332
kurtmckee
added a commit
to kurtmckee/pr-redis-py
that referenced
this issue
Jul 23, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes redis#3332
6 tasks
kurtmckee
added a commit
to kurtmckee/pr-redis-py
that referenced
this issue
Jul 31, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes redis#3332
vladvildanov
added a commit
that referenced
this issue
Sep 2, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes #3332 Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com>
This would be caught by a linter such as Ruff: #3147 |
But then you would be using ruff. |
This is true. Is that a problem? |
I apologize, my comment just created disharmony and didn't contribute anything useful. Please disregard. |
vladvildanov
added a commit
that referenced
this issue
Sep 27, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes #3332 Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com>
vladvildanov
added a commit
that referenced
this issue
Sep 27, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes #3332 Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com>
vladvildanov
added a commit
that referenced
this issue
Sep 27, 2024
The second definition was copied over the first definition, with the following changes: * The type annotations were copied to the second definition * The mutable default arguments to the `keys` and `args` parameters were replaced with `None`, as is best-practice. Closes #3332 Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Script
class is defined twice inredis/commands/core.py
, at lines 5462 and 6286:redis-py/redis/commands/core.py
Line 5462 in 2ffcac3
redis-py/redis/commands/core.py
Line 6286 in 2ffcac3
git blame
shows that both definitions were created on 2022-02-22, by different authors, within 1.5 hours of each other. I intend to submit a PR to delete the first definition, as the first definition is overwritten by the second definition as the file is parsed.The text was updated successfully, but these errors were encountered: