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

RUF006 now triggers on assignments to globals #9262

Closed
hauntsaninja opened this issue Dec 23, 2023 · 1 comment · Fixed by #9263
Closed

RUF006 now triggers on assignments to globals #9262

hauntsaninja opened this issue Dec 23, 2023 · 1 comment · Fixed by #9263
Assignees
Labels
bug Something isn't working

Comments

@hauntsaninja
Copy link
Contributor

hauntsaninja commented Dec 23, 2023

Since #9060, ruff now complains about:

import asyncio

consumer_task: asyncio.Task

class Something:
    @classmethod
    async def start_async(cls, something):
        global consumer_task
        consumer_task = asyncio.create_task(something.consume_messages())
        return something

Similar issue applies to assignments to nonlocal

Filing as per #9060 (comment)

@charliermarsh
Copy link
Member

Thanks! Will fix.

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

Successfully merging a pull request may close this issue.

2 participants