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

pycodestyle 2.10 breaks autopep8 tests #661

Closed
bjornfor opened this issue Dec 12, 2022 · 4 comments
Closed

pycodestyle 2.10 breaks autopep8 tests #661

bjornfor opened this issue Dec 12, 2022 · 4 comments

Comments

@bjornfor
Copy link

Hi,

I'm a package maintainer of autopep8 in Nixpkgs, and since the upgrade of pycodestyle 2.9.1 -> 2.10, autopep8 fails to build like this:

$ cd nixpkgs
$ git checkout 3a2e1fcdd319f5bb4dce8b69abafc1fd0635079d
$ nix-build -A python3Packages.autopep8
[...]
============================= test session starts ==============================                                                                                                                                                              
platform linux -- Python 3.10.8, pytest-7.1.3, pluggy-1.0.0                                                                                                                                                                                   
rootdir: /build/autopep8-2.0.0                                                                                                                                                                                                                
collected 599 items / 1 deselected / 598 selected                                                                                                                                                                                             
                                                                                                                                                                                                                                              
test/test_autopep8.py .................................................. [  8%]                                                                                                                                                               
........................................................................ [ 20%]                                                                                                                                                               
........................................................................ [ 32%]                                                                                                                                                               
........................................................................ [ 44%]                                                                                                                                                               
........................................................................ [ 56%]                                                                                                                                                               
........................................................................ [ 68%]                                                                                                                                                               
..............FFFFFF.sF.FFFFFFFF...F.FFFF............................... [ 80%]                                                                                                                                                               
.........................................s.............................. [ 92%]                                                                                                                                                               
........s...................................                             [100%]                                                                                                                                                               
                                                                                                                                                                                                                                              
=================================== FAILURES ===================================                                                                                                                                                              
_____________________ SystemTests.test_w602_arg_is_string ______________________                                                                                                                                                              
                                                                                                                                                                                                                                              
self = <test.test_autopep8.SystemTests testMethod=test_w602_arg_is_string>                                                                                                                                                                    
                                                                                                                                                                                                                                              
    def test_w602_arg_is_string(self):                                                                                                                                                                                                        
        line = "raise ValueError, \"w602 test\"\n"                                                                                                                                                                                            
        fixed = "raise ValueError(\"w602 test\")\n"                                                                                                                                                                                           
        with autopep8_context(line, options=['--aggressive']) as result:                                                                                                                                                                      
>           self.assertEqual(fixed, result)                                                                                                                                                                                                   
E           AssertionError: 'raise ValueError("w602 test")\n' != 'raise ValueError, "w602 test"\n'                                                                                                                                            
E           - raise ValueError("w602 test")                                                                                                                                                                                                   
E           ?                 ^           -                                                                                                                                                                                                   
E           + raise ValueError, "w602 test"                                                                                                                                                                                                   
E           ?                 ^^                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
test/test_autopep8.py:4940: AssertionError                                                                                                                                                                                                    
[...many similar looking failures...]

Changelog for pycodestyle: https://github.com/PyCQA/pycodestyle/blob/2.10.0/CHANGES.txt
Nixpkgs issue: NixOS/nixpkgs#205733

Your Environment

  • Python version: 3.10
  • autopep8 version: 2.0.0
  • Platform: windows, Linux / Nixpkgs
@lilyinstarlight
Copy link

@bjornfor, it looks like this was fixed by #659 but just hasn't made it into a release yet

@bjornfor
Copy link
Author

@lilyinstarlight: thanks, closing then.

@hhatto
Copy link
Owner

hhatto commented Dec 16, 2022

Thanks for reporting.

We have released version 2.0.1, which fixes this problem.

@sebastien-genete
Copy link

Is it linked to this issue :
#664 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants