Skip to content
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

... being replaced with Ellipsis #273

Closed
2 tasks done
diceroll123 opened this issue Sep 4, 2022 · 3 comments
Closed
2 tasks done

... being replaced with Ellipsis #273

diceroll123 opened this issue Sep 4, 2022 · 3 comments
Assignees
Labels
bug Something isn't working next release This will be fixed in next release

Comments

@diceroll123
Copy link

diceroll123 commented Sep 4, 2022

Checklist

  • I have searched the Sourcery documentation for the issue, and found nothing
  • I have checked there are no open bugs referencing the same bug or problem

Description

from typing import overload

class Test:
    @overload
    # @staticmethod
    def blah(param: str) -> str:
        # when @staticmethod is commented out, the line below wants to be refactored to Ellipsis
        # which actually causes the overload function to break because Ellipsis is not the same as `...`
        # the refactoring itself is fine, which wants to make the param into `self`, but the `...` -> `Ellipsis` is the bug.
        # this is a weird way to find this bug, I will admit.
        ...

    @overload
    @staticmethod
    def blah(param: int) -> str:
        ...

    @staticmethod
    def blah(param: str | int) -> str:
        return str(param)

Debug Information

IDE Version:
Version: 1.71.0 (Universal)
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Date: 2022-09-01T07:25:38.437Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 22.1.0
Sandboxed: No

Sourcery Version:
v0.12.7

@diceroll123 diceroll123 added the bug Something isn't working label Sep 4, 2022
@reka
Copy link
Contributor

reka commented Sep 6, 2022

Hi @diceroll123 ,

Thanks a lot for reporting this 🐛
IMO, it's a rather cool way to find it. 😎

We'll look into it and let you know when there's a fix.

@Hellebore Hellebore self-assigned this Sep 8, 2022
@Hellebore Hellebore added the next release This will be fixed in next release label Sep 9, 2022
@Hellebore
Copy link
Collaborator

Hi @diceroll123 - I've now added a fix, which will be in the next release.

@Hellebore
Copy link
Collaborator

Should now be fixed with 0.12.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next release This will be fixed in next release
Projects
None yet
Development

No branches or pull requests

3 participants