From 1fcc2a6ea47a1bfd02794819836744e86a2a42cd Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 4 Aug 2018 13:02:09 -0700 Subject: [PATCH] zulint: Move lister.py to tools/zulint. This is preparatory refactoring work for being able to extract the linter as an external project called "zulint". --- mypy.ini | 2 +- tools/check-templates | 2 +- tools/html-grep | 2 +- tools/lint | 2 +- tools/replacer | 2 +- tools/run-mypy | 2 +- tools/zulint/__init__.py | 0 tools/{ => zulint}/lister.py | 0 8 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 tools/zulint/__init__.py rename tools/{ => zulint}/lister.py (100%) diff --git a/mypy.ini b/mypy.ini index a5e2bb6ac9..1c36f6ba6d 100644 --- a/mypy.ini +++ b/mypy.ini @@ -62,7 +62,7 @@ ignore_missing_imports = True [mypy-linter_lib.printer] ignore_missing_imports = True -[mypy-lister,.lister] +[mypy-zulint,zulint.lister,zulint.lister.*] ignore_missing_imports = True diff --git a/tools/check-templates b/tools/check-templates index 78d127386b..ee0e949f82 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -10,7 +10,7 @@ import logging from lib import sanity_check sanity_check.check_venv(__file__) -import lister +from zulint import lister from typing import cast, Callable, Dict, Iterable, List EXCLUDED_FILES = [ diff --git a/tools/html-grep b/tools/html-grep index 2fe5826048..881aa41b9b 100755 --- a/tools/html-grep +++ b/tools/html-grep @@ -9,7 +9,7 @@ from typing import List from lib import sanity_check sanity_check.check_venv(__file__) -import lister +from zulint import lister USAGE = ''' This file greps HTML files for keywords in a context-sensitive manner. diff --git a/tools/lint b/tools/lint index 9e1a33a2ef..8e7c4cf08b 100755 --- a/tools/lint +++ b/tools/lint @@ -13,7 +13,7 @@ from linter_lib.printer import print_err, colors from lib import sanity_check sanity_check.check_venv(__file__) -import lister +from zulint import lister from typing import cast, Callable, Dict, Iterator, List diff --git a/tools/replacer b/tools/replacer index 95828daef3..9d73d252f4 100755 --- a/tools/replacer +++ b/tools/replacer @@ -4,7 +4,7 @@ import argparse from subprocess import check_call from typing import List, Dict, Union -from .lister import list_files +from zulint.lister import list_files def do_replace(listing, old_string, new_string): # type: (Union[Dict[str, List[str]], List[str]], str, str) -> None diff --git a/tools/run-mypy b/tools/run-mypy index ccf707cfe0..fafe3dd980 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -6,7 +6,7 @@ import sys import argparse import subprocess -import lister +from zulint import lister from typing import cast, Dict, List TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/tools/zulint/__init__.py b/tools/zulint/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/lister.py b/tools/zulint/lister.py similarity index 100% rename from tools/lister.py rename to tools/zulint/lister.py