mgedmin: It might be a good idea to backport this fix to the 2.1.x branch and release a 2.1.2, to fix the regression in 2.1.0.

(AFAIU the current git master is aiming to be 2.2.0 due to #426.)
sigmavirus24: There is no `2.1.x` branch anywhere. 
mgedmin: > There is no 2.1.x branch anywhere

I meant the 2.1.x branch of version numbers rather than a git branch.

(There's a 2.1.1 tag that with one commit that branches off `master` but is not contained in any other git branch.  I imagine it was created for the same reason: to have a fix in the 2.1.x release series without introducing backwards-incompatible output changes of #426.)
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 83f92aa..86cfd11 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -1162,7 +1162,8 @@ class Checker(object):
         self.scopeStack = [self.scopeStack[0]]
         node_offset = self.offset or (0, 0)
         self.pushScope(DoctestScope)
-        self.addBinding(None, Builtin('_'))
+        if '_' not in self.scopeStack[0]:
+            self.addBinding(None, Builtin('_'))
         for example in examples:
             try:
                 tree = ast.parse(example.source, "<doctest>")

2.1.0: PYFLAKES_DOCTEST=1 causes stacktrace: AttributeError: 'NoneType' object has no attribute 'parent'
From https://gitlab.com/pycqa/flake8/issues/492

```console
$ pyflakes --version
2.1.0 Python 3.6.7 on Linux
```

```python
import foo as _

def x():
    """doc

    >>> x()
    >>> x()
    """
```

```console
$ PYFLAKES_DOCTEST=1 pyflakes t.py 
Traceback (most recent call last):
  File "/tmp/t/venv/bin/pyflakes", line 10, in <module>
    sys.exit(main())
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 207, in main
    warnings = checkRecursive(args, reporter)
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 156, in checkRecursive
    warnings += checkPath(sourcePath, reporter)
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 99, in checkPath
    return check(codestr, filename, reporter)
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 74, in check
    w = checker.Checker(tree, file_tokens=file_tokens, filename=filename)
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 665, in __init__
    self.runDeferred(self._deferredFunctions)
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 702, in runDeferred
    handler()
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 1410, in <lambda>
    self.deferFunction(lambda: self.handleDoctests(node))
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 1148, in handleDoctests
    self.addBinding(None, Builtin('_'))
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 870, in addBinding
    parent_stmt = self.getParent(value.source)
  File "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 808, in getParent
    node = node.parent
AttributeError: 'NoneType' object has no attribute 'parent'

```
diff --git a/pyflakes/test/test_doctests.py b/pyflakes/test/test_doctests.py
index 0825ffe..5565226 100644
--- a/pyflakes/test/test_doctests.py
+++ b/pyflakes/test/test_doctests.py
@@ -433,6 +433,16 @@ class Test(TestCase):
             return 1
         ''')
 
+    def test_globalUnderscoreInDoctest(self):
+        self.flakes("""
+        from gettext import ugettext as _
+
+        def doctest_stuff():
+            '''
+                >>> pass
+            '''
+        """, m.UnusedImport)
+
 
 class TestOther(_DoctestMixin, TestOther):
     """Run TestOther with each test wrapped in a doctest."""

pip install -e .
parse_log_pytest
pytest
flake8 pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///croot/attrs_1668696182826/work
certifi @ file:///croot/certifi_1671487769961/work/certifi
flake8==5.0.4
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
importlib-metadata==4.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
mccabe==0.7.0
packaging @ file:///croot/packaging_1671697413597/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.9.1
-e git+https://github.com/PyCQA/pyflakes.git@4a807d45f9dd47266c82035bf6e04508a77f0258#egg=pyflakes
pytest==7.1.2
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
zipp @ file:///croot/zipp_1672387121353/work

name: pyflakes
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - flake8==5.0.4
      - importlib-metadata==4.2.0
      - mccabe==0.7.0
      - pycodestyle==2.9.1
prefix: /opt/conda/envs/pyflakes

pyflakes/test/test_doctests.py::Test::test_globalUnderscoreInDoctest
pyflakes/test/test_doctests.py::TestOther::test_attrAugmentedAssignment pyflakes/test/test_doctests.py::TestOther::test_breakInsideLoop pyflakes/test/test_doctests.py::TestOther::test_breakOutsideLoop pyflakes/test/test_doctests.py::TestOther::test_classFunctionDecorator pyflakes/test/test_doctests.py::TestOther::test_classNameDefinedPreviously pyflakes/test/test_doctests.py::TestOther::test_classNameUndefinedInClassBody pyflakes/test/test_doctests.py::TestOther::test_classRedefinedAsFunction pyflakes/test/test_doctests.py::TestOther::test_classRedefinition pyflakes/test/test_doctests.py::TestOther::test_classWithReturn pyflakes/test/test_doctests.py::TestOther::test_classWithYield pyflakes/test/test_doctests.py::TestOther::test_classWithYieldFrom pyflakes/test/test_doctests.py::TestOther::test_comparison pyflakes/test/test_doctests.py::TestOther::test_containment pyflakes/test/test_doctests.py::TestOther::test_continueInFinally pyflakes/test/test_doctests.py::TestOther::test_continueInsideLoop pyflakes/test/test_doctests.py::TestOther::test_continueOutsideLoop pyflakes/test/test_doctests.py::TestOther::test_defaultExceptLast pyflakes/test/test_doctests.py::TestOther::test_defaultExceptNotLast pyflakes/test/test_doctests.py::TestOther::test_doubleAssignmentConditionally pyflakes/test/test_doctests.py::TestOther::test_doubleAssignmentWithUse pyflakes/test/test_doctests.py::TestOther::test_duplicateArgs pyflakes/test/test_doctests.py::TestOther::test_ellipsis pyflakes/test/test_doctests.py::TestOther::test_extendedSlice pyflakes/test/test_doctests.py::TestOther::test_functionDecorator pyflakes/test/test_doctests.py::TestOther::test_functionRedefinedAsClass pyflakes/test/test_doctests.py::TestOther::test_function_arguments pyflakes/test/test_doctests.py::TestOther::test_function_arguments_python3 pyflakes/test/test_doctests.py::TestOther::test_globalDeclaredInDifferentScope pyflakes/test/test_doctests.py::TestOther::test_identity pyflakes/test/test_doctests.py::TestOther::test_localReferencedBeforeAssignment pyflakes/test/test_doctests.py::TestOther::test_loopControl pyflakes/test/test_doctests.py::TestOther::test_modernProperty pyflakes/test/test_doctests.py::TestOther::test_moduleWithReturn pyflakes/test/test_doctests.py::TestOther::test_moduleWithYield pyflakes/test/test_doctests.py::TestOther::test_moduleWithYieldFrom pyflakes/test/test_doctests.py::TestOther::test_redefinedClassFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedIfElseFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedIfElseInListComp pyflakes/test/test_doctests.py::TestOther::test_redefinedIfFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedInDictComprehension pyflakes/test/test_doctests.py::TestOther::test_redefinedInGenerator pyflakes/test/test_doctests.py::TestOther::test_redefinedInSetComprehension pyflakes/test/test_doctests.py::TestOther::test_redefinedTryExceptFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedTryFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedUnderscoreFunction pyflakes/test/test_doctests.py::TestOther::test_redefinedUnderscoreImportation pyflakes/test/test_doctests.py::TestOther::test_starredAssignmentErrors pyflakes/test/test_doctests.py::TestOther::test_starredAssignmentNoError pyflakes/test/test_doctests.py::TestOther::test_unaryPlus pyflakes/test/test_doctests.py::TestOther::test_undefinedBaseClass pyflakes/test/test_doctests.py::TestOther::test_varAugmentedAssignment pyflakes/test/test_doctests.py::TestImports::test_aliasedImport pyflakes/test/test_doctests.py::TestImports::test_aliasedImportShadowModule pyflakes/test/test_doctests.py::TestImports::test_assignRHSFirst pyflakes/test/test_doctests.py::TestImports::test_assignedToGlobal pyflakes/test/test_doctests.py::TestImports::test_differentSubmoduleImport pyflakes/test/test_doctests.py::TestImports::test_duplicateSubmoduleImport pyflakes/test/test_doctests.py::TestImports::test_functionNamesAreBoundNow pyflakes/test/test_doctests.py::TestImports::test_functionsRunLater pyflakes/test/test_doctests.py::TestImports::test_futureImport pyflakes/test/test_doctests.py::TestImports::test_futureImportFirst pyflakes/test/test_doctests.py::TestImports::test_futureImportStar pyflakes/test/test_doctests.py::TestImports::test_futureImportUndefined pyflakes/test/test_doctests.py::TestImports::test_futureImportUsed pyflakes/test/test_doctests.py::TestImports::test_ignoreNonImportRedefinitions pyflakes/test/test_doctests.py::TestImports::test_importInClass pyflakes/test/test_doctests.py::TestImports::test_importStar pyflakes/test/test_doctests.py::TestImports::test_importStar_relative pyflakes/test/test_doctests.py::TestImports::test_importUsedInMethodDefinition pyflakes/test/test_doctests.py::TestImports::test_importedInClass pyflakes/test/test_doctests.py::TestImports::test_localImportStar pyflakes/test/test_doctests.py::TestImports::test_methodsDontUseClassScope pyflakes/test/test_doctests.py::TestImports::test_nestedClassAndFunctionScope pyflakes/test/test_doctests.py::TestImports::test_nestedFunctionsNestScope pyflakes/test/test_doctests.py::TestImports::test_newAssignment pyflakes/test/test_doctests.py::TestImports::test_nonGlobalDoesNotRedefine pyflakes/test/test_doctests.py::TestImports::test_notUsedInNestedScope pyflakes/test/test_doctests.py::TestImports::test_packageImport pyflakes/test/test_doctests.py::TestImports::test_redefinedButUsedLater pyflakes/test/test_doctests.py::TestImports::test_redefinedByClass pyflakes/test/test_doctests.py::TestImports::test_redefinedByExcept pyflakes/test/test_doctests.py::TestImports::test_redefinedByFor pyflakes/test/test_doctests.py::TestImports::test_redefinedByFunction pyflakes/test/test_doctests.py::TestImports::test_redefinedBySubclass pyflakes/test/test_doctests.py::TestImports::test_redefinedIf pyflakes/test/test_doctests.py::TestImports::test_redefinedIfElse pyflakes/test/test_doctests.py::TestImports::test_redefinedInClass pyflakes/test/test_doctests.py::TestImports::test_redefinedInNestedFunction pyflakes/test/test_doctests.py::TestImports::test_redefinedInNestedFunctionTwice pyflakes/test/test_doctests.py::TestImports::test_redefinedTry pyflakes/test/test_doctests.py::TestImports::test_redefinedTryElse pyflakes/test/test_doctests.py::TestImports::test_redefinedTryExcept pyflakes/test/test_doctests.py::TestImports::test_redefinedTryExceptElse pyflakes/test/test_doctests.py::TestImports::test_redefinedTryExceptElseFinally pyflakes/test/test_doctests.py::TestImports::test_redefinedTryExceptFinally pyflakes/test/test_doctests.py::TestImports::test_redefinedTryExceptMulti pyflakes/test/test_doctests.py::TestImports::test_redefinedTryNested pyflakes/test/test_doctests.py::TestImports::test_redefinedWhileUnused pyflakes/test/test_doctests.py::TestImports::test_shadowedByFor pyflakes/test/test_doctests.py::TestImports::test_shadowedByForDeep pyflakes/test/test_doctests.py::TestImports::test_shadowedByLambda pyflakes/test/test_doctests.py::TestImports::test_shadowedByParameter pyflakes/test/test_doctests.py::TestImports::test_tryingMultipleImports pyflakes/test/test_doctests.py::TestImports::test_unusedImport pyflakes/test/test_doctests.py::TestImports::test_unusedImport_relative pyflakes/test/test_doctests.py::TestImports::test_unusedInNestedScope pyflakes/test/test_doctests.py::TestImports::test_unusedPackageImport pyflakes/test/test_doctests.py::TestImports::test_unused_package_with_submodule_import pyflakes/test/test_doctests.py::TestImports::test_usedAndGlobal pyflakes/test/test_doctests.py::TestImports::test_usedImport pyflakes/test/test_doctests.py::TestImports::test_usedImport_relative pyflakes/test/test_doctests.py::TestImports::test_usedInAssert pyflakes/test/test_doctests.py::TestImports::test_usedInAssignment pyflakes/test/test_doctests.py::TestImports::test_usedInAttributeAssign pyflakes/test/test_doctests.py::TestImports::test_usedInCall pyflakes/test/test_doctests.py::TestImports::test_usedInClass pyflakes/test/test_doctests.py::TestImports::test_usedInClassBase pyflakes/test/test_doctests.py::TestImports::test_usedInDict pyflakes/test/test_doctests.py::TestImports::test_usedInElifConditional pyflakes/test/test_doctests.py::TestImports::test_usedInElse pyflakes/test/test_doctests.py::TestImports::test_usedInExcept pyflakes/test/test_doctests.py::TestImports::test_usedInExec pyflakes/test/test_doctests.py::TestImports::test_usedInFor pyflakes/test/test_doctests.py::TestImports::test_usedInForElse pyflakes/test/test_doctests.py::TestImports::test_usedInFunction pyflakes/test/test_doctests.py::TestImports::test_usedInGetattr pyflakes/test/test_doctests.py::TestImports::test_usedInGlobal pyflakes/test/test_doctests.py::TestImports::test_usedInIfBody pyflakes/test/test_doctests.py::TestImports::test_usedInIfConditional pyflakes/test/test_doctests.py::TestImports::test_usedInKeywordArg pyflakes/test/test_doctests.py::TestImports::test_usedInLambda pyflakes/test/test_doctests.py::TestImports::test_usedInList pyflakes/test/test_doctests.py::TestImports::test_usedInListComp pyflakes/test/test_doctests.py::TestImports::test_usedInLogic pyflakes/test/test_doctests.py::TestImports::test_usedInOperators pyflakes/test/test_doctests.py::TestImports::test_usedInParameterDefault pyflakes/test/test_doctests.py::TestImports::test_usedInRaise pyflakes/test/test_doctests.py::TestImports::test_usedInReturn pyflakes/test/test_doctests.py::TestImports::test_usedInSlice pyflakes/test/test_doctests.py::TestImports::test_usedInSliceObj pyflakes/test/test_doctests.py::TestImports::test_usedInSubscript pyflakes/test/test_doctests.py::TestImports::test_usedInTry pyflakes/test/test_doctests.py::TestImports::test_usedInTryFinally pyflakes/test/test_doctests.py::TestImports::test_usedInTuple pyflakes/test/test_doctests.py::TestImports::test_usedInWhile pyflakes/test/test_doctests.py::TestImports::test_usedInYield pyflakes/test/test_doctests.py::TestImports::test_used_package_with_submodule_import pyflakes/test/test_doctests.py::TestImports::test_used_package_with_submodule_import_of_alias pyflakes/test/test_doctests.py::TestUndefinedNames::test_annotationUndefined pyflakes/test/test_doctests.py::TestUndefinedNames::test_badNestedClass pyflakes/test/test_doctests.py::TestUndefinedNames::test_builtinWindowsError pyflakes/test/test_doctests.py::TestUndefinedNames::test_builtins pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedAsStarArgs pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedAsStarUnpack pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedByGlobal pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedByGlobalMultipleNames pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedFromLambdaInDictionaryComprehension pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedFromLambdaInGenerator pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedInClass pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedInClassNested pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedInGenExp pyflakes/test/test_doctests.py::TestUndefinedNames::test_definedInListComp pyflakes/test/test_doctests.py::TestUndefinedNames::test_del pyflakes/test/test_doctests.py::TestUndefinedNames::test_delConditional pyflakes/test/test_doctests.py::TestUndefinedNames::test_delConditionalNested pyflakes/test/test_doctests.py::TestUndefinedNames::test_delExceptionInExcept pyflakes/test/test_doctests.py::TestUndefinedNames::test_delGlobal pyflakes/test/test_doctests.py::TestUndefinedNames::test_delUndefined pyflakes/test/test_doctests.py::TestUndefinedNames::test_delWhile pyflakes/test/test_doctests.py::TestUndefinedNames::test_delWhileNested pyflakes/test/test_doctests.py::TestUndefinedNames::test_delWhileTestUsage pyflakes/test/test_doctests.py::TestUndefinedNames::test_doubleNestingReportsClosestName pyflakes/test/test_doctests.py::TestUndefinedNames::test_dunderClass pyflakes/test/test_doctests.py::TestUndefinedNames::test_functionsNeedGlobalScope pyflakes/test/test_doctests.py::TestUndefinedNames::test_globalFromNestedScope pyflakes/test/test_doctests.py::TestUndefinedNames::test_globalImportStar pyflakes/test/test_doctests.py::TestUndefinedNames::test_globalInGlobalScope pyflakes/test/test_doctests.py::TestUndefinedNames::test_global_reset_name_only pyflakes/test/test_doctests.py::TestUndefinedNames::test_intermediateClassScopeIgnored pyflakes/test/test_doctests.py::TestUndefinedNames::test_keywordOnlyArgs pyflakes/test/test_doctests.py::TestUndefinedNames::test_keywordOnlyArgsUndefined pyflakes/test/test_doctests.py::TestUndefinedNames::test_laterRedefinedGlobalFromNestedScope pyflakes/test/test_doctests.py::TestUndefinedNames::test_laterRedefinedGlobalFromNestedScope2 pyflakes/test/test_doctests.py::TestUndefinedNames::test_laterRedefinedGlobalFromNestedScope3 pyflakes/test/test_doctests.py::TestUndefinedNames::test_magicGlobalsBuiltins pyflakes/test/test_doctests.py::TestUndefinedNames::test_magicGlobalsFile pyflakes/test/test_doctests.py::TestUndefinedNames::test_magicGlobalsName pyflakes/test/test_doctests.py::TestUndefinedNames::test_magicGlobalsPath pyflakes/test/test_doctests.py::TestUndefinedNames::test_magicModuleInClassScope pyflakes/test/test_doctests.py::TestUndefinedNames::test_metaClassUndefined pyflakes/test/test_doctests.py::TestUndefinedNames::test_moduleAnnotations pyflakes/test/test_doctests.py::TestUndefinedNames::test_namesDeclaredInExceptBlocks pyflakes/test/test_doctests.py::TestUndefinedNames::test_nestedClass pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefined pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedAugmentedAssignment pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedExceptionName pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedExceptionNameObscuringGlobalVariableFalsePositive1 pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedExceptionNameObscuringGlobalVariableFalsePositive2 pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedExceptionNameObscuringLocalVariable2 pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedExceptionNameObscuringLocalVariableFalsePositive1 pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedExceptionNameObscuringLocalVariableFalsePositive2 pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedFromLambdaInComprehension pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedFromLambdaInDictionaryComprehension pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedInGenExpNested pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedInListComp pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedInLoop pyflakes/test/test_doctests.py::TestUndefinedNames::test_undefinedWithErrorHandler pyflakes/test/test_doctests.py::TestUndefinedNames::test_unusedAsStarUnpack pyflakes/test/test_doctests.py::TestUndefinedNames::test_usedAsStarUnpack pyflakes/test/test_doctests.py::Test::test_doctestCanReferToClass pyflakes/test/test_doctests.py::Test::test_doctestCanReferToFunction pyflakes/test/test_doctests.py::Test::test_global_module_scope_pollution pyflakes/test/test_doctests.py::Test::test_global_undefined pyflakes/test/test_doctests.py::Test::test_ignore_nested_function pyflakes/test/test_doctests.py::Test::test_importBeforeDoctest pyflakes/test/test_doctests.py::Test::test_importInDoctestAndAfter pyflakes/test/test_doctests.py::Test::test_inaccessible_scope_class pyflakes/test/test_doctests.py::Test::test_indentationErrorInDoctest pyflakes/test/test_doctests.py::Test::test_nested_class pyflakes/test/test_doctests.py::Test::test_nested_doctest_ignored pyflakes/test/test_doctests.py::Test::test_noOffsetSyntaxErrorInDoctest pyflakes/test/test_doctests.py::Test::test_offsetAfterDoctests pyflakes/test/test_doctests.py::Test::test_offsetInDoctests pyflakes/test/test_doctests.py::Test::test_offsetInLambdasInDoctests pyflakes/test/test_doctests.py::Test::test_offsetWithMultiLineArgs pyflakes/test/test_doctests.py::Test::test_scope_class pyflakes/test/test_doctests.py::Test::test_singleUnderscoreInDoctest pyflakes/test/test_doctests.py::Test::test_syntaxErrorInDoctest
pyflakes/checker.py
pyflakes/checker.py