raulcd opened a new issue, #36973:
URL: https://github.com/apache/arrow/issues/36973

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   It does seem that a new version of pyflakes8 released on the 29th is making 
our linter fail, see this job:
   
https://github.com/apache/arrow/actions/runs/5726747811/job/15517800197?pr=36616
   
   We haven't noticed before because the `pip install archery[lint]` step was 
being cached from docker.
   
   Example of lint with old version:
   ```
   $ pip freeze | grep flake8
   flake8==4.0.1
   $ archery lint --python 
   INFO:archery:Running Python formatter (autopep8)
   INFO:archery:Running Python linter (flake8)
   INFO:archery:Running Cython linter (cython-lint)
   ```
   Upgrading to the new version:
   ```
   $ pip freeze | grep flake8
   flake8==6.1.0
   $ archery lint --python 
   INFO:archery:Running Python formatter (autopep8)
   --- original//home/raulcd/code/arrow/python/pyarrow/tests/test_flight.py
   +++ fixed//home/raulcd/code/arrow/python/pyarrow/tests/test_flight.py
   @@ -1495,7 +1495,7 @@
        """Check that incorrectly overriding the hostname fails."""
        certs = example_tls_certs()
    
   -    with ConstantFlightServer(tls_certificates=certs["certificates"]) as s,\
   +    with ConstantFlightServer(tls_certificates=certs["certificates"]) as s, 
\
            flight.connect(('localhost', s.port),
                           tls_root_certs=certs["root_cert"],
                           override_hostname="fakehostname") as client:
   --- original//home/raulcd/code/arrow/python/pyarrow/tests/test_dataset.py
   +++ fixed//home/raulcd/code/arrow/python/pyarrow/tests/test_dataset.py
   @@ -5181,9 +5181,9 @@
                          "a.dotted.field": [1, 2],
                          "interaction": [
            {"type": None, "element": "button",
   -         "values": [1, 2], "structs":[{"foo": "bar"}, None]},
   +         "values": [1, 2], "structs": [{"foo": "bar"}, None]},
            {"type": "scroll", "element": "window",
   -         "values": [None, 3, 4], "structs":[{"fizz": "buzz"}]}
   +         "values": [None, 3, 4], "structs": [{"fizz": "buzz"}]}
        ]})
        ds.write_dataset(table, tempdir / "table", format=format)
        ds1 = ds.dataset(tempdir / "table", format=format)
   
   INFO:archery:Running Python linter (flake8)
   /home/raulcd/code/arrow/python/pyarrow/tests/test_array.py:304:12: E721 do 
not compare types, for exact checks use `is` / `is not`, for instance checks 
use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_csv.py:1939:24: E721 do 
not compare types, for exact checks use `is` / `is not`, for instance checks 
use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_dataset.py:5024:12: E721 
do not compare types, for exact checks use `is` / `is not`, for instance checks 
use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_dataset.py:5184:37: E231 
missing whitespace after ':'
   /home/raulcd/code/arrow/python/pyarrow/tests/test_dataset.py:5186:43: E231 
missing whitespace after ':'
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:343:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:344:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:740:21: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:802:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:810:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:833:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:1264:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_extension_type.py:1272:12: 
E721 do not compare types, for exact checks use `is` / `is not`, for instance 
checks use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_flight.py:1498:75: E231 
missing whitespace after ','
   /home/raulcd/code/arrow/python/pyarrow/tests/test_table.py:514:12: E721 do 
not compare types, for exact checks use `is` / `is not`, for instance checks 
use `isinstance()`
   /home/raulcd/code/arrow/python/pyarrow/tests/test_table.py:952:12: E721 do 
not compare types, for exact checks use `is` / `is not`, for instance checks 
use `isinstance()`
   INFO:archery:Running Cython linter (cython-lint)
   ```
   
   ### Component(s)
   
   Continuous Integration, Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to