-
Notifications
You must be signed in to change notification settings - Fork 65
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
addressing issue 114: await async rule does not account for decorators #150
Conversation
Does the expected replacement you added to your tests have some errors? I'm using this instead: Invalid(
"""
class Foo:
@classmethod
async def _method(cls): pass
Foo._method()
""",
expected_replacement="""
class Foo:
@classmethod
async def _method(cls): pass
await Foo._method()
""",
),
Invalid(
"""
class Foo:
@staticmethod
async def _method(): pass
Foo._method()
""",
expected_replacement="""
class Foo:
@staticmethod
async def _method(): pass
await Foo._method()
""",
), However, those tests pass even without chaning |
thanks @Kronuz for your correction. Unfortunately I cannot verify or try my changes. I get: (fixit-env) haroldo@KTM:~/github/Fixit$ python3 -m fixit.common.generate_pyre_fixtures AwaitAsyncCallRule Any ideas why the generate_python_fixtures doesn't run on this code? thanks |
That's the command I used to generate the fixtures, it should be working. Try removing and re-creating the virtual environment. Other than that, maybe @jimmylai can shed some light on it. |
It works for me as the following output. Your dev environment has some issues. You can probably try to delete your venv and follow the steps in README to create.
To unblock your work, you also can use my generated fixture.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Summary
addressing issue 114: await async rule does not account for decorators
Test Plan
tox -e py38 -- fixit.tests.AwaitAsyncCallRule