zupo / flake8-mock

Provides checking mock non-existent methods
GNU General Public License v2.0
16 stars 8 forks source link

Python 3.12 support #16

Open yakimka opened 8 months ago

yakimka commented 8 months ago

Hello, I'm encountering E902 errors with flake8 after installing the flake8-mock plugin.

Steps to Reproduce:

  1. Create a file named test_foo.py.
  2. Execute the command:
    docker run --rm -it -v $(pwd)/test_foo.py:/code/test_foo.py -w /code python:3.12-slim-bullseye bash
  3. Install flake8:
    pip install flake8
  4. Run flake8 and observe that there are no errors:
    flake8
  5. Install flake8-mock:
    pip install flake8-mock==0.4
  6. Run flake8 again:
    flake8
  7. Now, observe the error:
    ./test_foo.py:28:2: E902 TokenError: unterminated string literal (detected at line 28)

Content of test_foo.py:

def test_foo():
    assert ""
зображення