Skip to content

Commit

Permalink
Merge pull request #1768 from PyCQA/deprecate-include-exclude-doctest
Browse files Browse the repository at this point in the history
deprecate --include-in-doctest --exclude-from-doctest
  • Loading branch information
asottile committed Dec 14, 2022
2 parents 80e6cdf + 4778fe9 commit 87198e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/flake8/plugins/pyflakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import argparse
import ast
import logging
import os
from typing import Any
from typing import Generator
Expand All @@ -12,6 +13,8 @@
from flake8 import utils
from flake8.options.manager import OptionManager

LOG = logging.getLogger(__name__)

FLAKE8_PYFLAKES_CODES = {
"UnusedImport": "F401",
"ImportShadowedByLoopVar": "F402",
Expand Down Expand Up @@ -137,6 +140,12 @@ def parse_options(cls, options: argparse.Namespace) -> None:
cls.builtIns = cls.builtIns.union(options.builtins)
cls.with_doctest = options.doctests

if options.include_in_doctest or options.exclude_from_doctest:
LOG.warning(
"--include-in-doctest / --exclude-from-doctest will be "
"removed in a future version. see PyCQA/flake8#1747"
)

included_files = []
for included_file in options.include_in_doctest:
if included_file == "":
Expand Down

0 comments on commit 87198e5

Please sign in to comment.