mirror of https://github.com/zulip/zulip.git
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".
This commit is contained in:
parent
5303281dfb
commit
1fcc2a6ea4
2
mypy.ini
2
mypy.ini
|
@ -62,7 +62,7 @@ ignore_missing_imports = True
|
||||||
[mypy-linter_lib.printer]
|
[mypy-linter_lib.printer]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
[mypy-lister,.lister]
|
[mypy-zulint,zulint.lister,zulint.lister.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import logging
|
||||||
from lib import sanity_check
|
from lib import sanity_check
|
||||||
sanity_check.check_venv(__file__)
|
sanity_check.check_venv(__file__)
|
||||||
|
|
||||||
import lister
|
from zulint import lister
|
||||||
from typing import cast, Callable, Dict, Iterable, List
|
from typing import cast, Callable, Dict, Iterable, List
|
||||||
|
|
||||||
EXCLUDED_FILES = [
|
EXCLUDED_FILES = [
|
||||||
|
|
|
@ -9,7 +9,7 @@ from typing import List
|
||||||
from lib import sanity_check
|
from lib import sanity_check
|
||||||
sanity_check.check_venv(__file__)
|
sanity_check.check_venv(__file__)
|
||||||
|
|
||||||
import lister
|
from zulint import lister
|
||||||
|
|
||||||
USAGE = '''
|
USAGE = '''
|
||||||
This file greps HTML files for keywords in a context-sensitive manner.
|
This file greps HTML files for keywords in a context-sensitive manner.
|
||||||
|
|
|
@ -13,7 +13,7 @@ from linter_lib.printer import print_err, colors
|
||||||
from lib import sanity_check
|
from lib import sanity_check
|
||||||
sanity_check.check_venv(__file__)
|
sanity_check.check_venv(__file__)
|
||||||
|
|
||||||
import lister
|
from zulint import lister
|
||||||
from typing import cast, Callable, Dict, Iterator, List
|
from typing import cast, Callable, Dict, Iterator, List
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import argparse
|
||||||
from subprocess import check_call
|
from subprocess import check_call
|
||||||
from typing import List, Dict, Union
|
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):
|
def do_replace(listing, old_string, new_string):
|
||||||
# type: (Union[Dict[str, List[str]], List[str]], str, str) -> None
|
# type: (Union[Dict[str, List[str]], List[str]], str, str) -> None
|
||||||
|
|
|
@ -6,7 +6,7 @@ import sys
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import lister
|
from zulint import lister
|
||||||
from typing import cast, Dict, List
|
from typing import cast, Dict, List
|
||||||
|
|
||||||
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
Loading…
Reference in New Issue