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

/aiohttp/pytest_plugin.py produced different code on second pass #1074

Closed
briglx opened this issue Oct 18, 2019 · 3 comments
Closed

/aiohttp/pytest_plugin.py produced different code on second pass #1074

briglx opened this issue Oct 18, 2019 · 3 comments
Labels
C: crash Black is crashing F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. T: bug Something isn't working

Comments

@briglx
Copy link

briglx commented Oct 18, 2019

Howdy! Sorry you're having trouble. To expedite your experience,
provide some basics for me:

Operating system: Ubuntu Subsystem on Win10
Python version: 3.7.5
Black version: 19.3b0
Does also happen on master: no

To answer the last question, you have two options:

  1. Use the online formatter at https://black.now.sh/?version=master, which will use the latest master branch.
  2. Or run black on your machine:
    • create a new virtualenv (make sure it's the same Python version);
    • clone this repository;
    • run pip install -e .;
    • make sure it's sane by running python setup.py test; and
    • run black like you did last time.
@briglx
Copy link
Author

briglx commented Oct 18, 2019

tmp.log

@JelleZijlstra
Copy link
Collaborator

The relevant snippet is

--- first pass
+++ second pass
@@ -330,13 +330,11 @@
     """
     clients = []
 
     async def go(__param, *args, server_kwargs=None, **kwargs):  # type: ignore
 
-        if isinstance(
-            __param, Callable
-        ) and not isinstance(  # type: ignore
+        if isinstance(__param, Callable) and not isinstance(  # type: ignore
             __param, (Application, BaseTestServer)
         ):
             __param = __param(loop, *args, **kwargs)
             kwargs = {}
         else:

Maybe this is the same as #1061?

@JelleZijlstra JelleZijlstra added the C: crash Black is crashing label May 30, 2021
@JelleZijlstra
Copy link
Collaborator

Going to assume this got fixed with #1061.

@ichard26 ichard26 added F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. T: bug Something isn't working labels May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: crash Black is crashing F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants