diff --git a/flake8_rst_docstrings.py b/flake8_rst_docstrings.py index 9d836ec..1188f90 100644 --- a/flake8_rst_docstrings.py +++ b/flake8_rst_docstrings.py @@ -3,6 +3,7 @@ This is a plugin for the tool flake8 tool for checking Python source code. """ + import ast import re diff --git a/tests/RST208/option_list.py b/tests/RST208/option_list.py index b48881c..24f4277 100644 --- a/tests/RST208/option_list.py +++ b/tests/RST208/option_list.py @@ -33,6 +33,7 @@ The end. """ # noqa: E501 + import sys print("Called with %i command line arguments" % (len(sys.argv) - 1)) diff --git a/tests/test_all.py b/tests/test_all.py index 7901fec..744bf44 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -1,4 +1,5 @@ """Test suite.""" + import ast import glob import os.path diff --git a/tests/test_cases/example_unicode.py b/tests/test_cases/example_unicode.py index 8abb1c4..9b66bcf 100644 --- a/tests/test_cases/example_unicode.py +++ b/tests/test_cases/example_unicode.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -u"""This module has an explicit UTF-8 encoding and unicode docstring. +"""This module has an explicit UTF-8 encoding and unicode docstring. The following text is a short sentence in Japanese: @@ -12,7 +12,7 @@ def hello_jp(): """Return 'Hello' in Japanese ('こんにちは').""" - return u"こんにちは" + return "こんにちは" __all__ = ("hello_jp",) # single entry tuple