From 7e8aafb7b62e8e27fa407218a1161a08345297b1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 10 Sep 2025 15:10:49 -0500 Subject: [PATCH 1/3] Remove dead battery: pytools.batchjob --- pytools/batchjob.py | 148 -------------------------------------------- 1 file changed, 148 deletions(-) delete mode 100644 pytools/batchjob.py diff --git a/pytools/batchjob.py b/pytools/batchjob.py deleted file mode 100644 index a9790520..00000000 --- a/pytools/batchjob.py +++ /dev/null @@ -1,148 +0,0 @@ -from __future__ import annotations - -from typing_extensions import override - - -def _cp(src, dest): - from pytools import assert_not_a_file - assert_not_a_file(dest) - - with open(src, "rb") as inf, open(dest, "wb") as outf: - outf.write(inf.read()) - - -def get_timestamp(): - from datetime import datetime - return datetime.now().strftime("%Y-%m-%d-%H%M%S") - - -class BatchJob: - def __init__(self, moniker, main_file, aux_files=(), timestamp=None): - import os - import os.path - - if timestamp is None: - timestamp = get_timestamp() - - self.moniker = ( - moniker - .replace("/", "-") - .replace("-$DATE", "") - .replace("$DATE-", "") - .replace("$DATE", "") - ) - self.subdir = moniker.replace("$DATE", timestamp) - self.path = os.path.join( - os.getcwd(), - self.subdir) - - os.makedirs(self.path) - - with open(f"{self.path}/run.sh", "w") as runscript: - import sys - runscript.write(f"{sys.executable} {main_file} setup.cpy") - - from os.path import basename - - if not main_file.startswith("-m "): - _cp(main_file, os.path.join(self.path, basename(main_file))) - - for aux_file in aux_files: - _cp(aux_file, os.path.join(self.path, basename(aux_file))) - - def write_setup(self, lines): - import os.path - with open(os.path.join(self.path, "setup.cpy"), "w") as setup: - setup.write("\n".join(lines)) - - -class INHERIT: - pass - - -class GridEngineJob(BatchJob): - def submit(self, env=(("LD_LIBRARY_PATH", INHERIT), ("PYTHONPATH", INHERIT)), - memory_megs=None, extra_args=()): - from subprocess import Popen - args = [ - "-N", self.moniker, - "-cwd", - ] - - from os import getenv - env = dict(env) - for var, value in env.items(): - if value is INHERIT: - value = getenv(var) - - args += ["-v", f"{var}={value}"] - - if memory_megs is not None: - args.extend(["-l", f"mem={memory_megs}"]) - - args.extend(extra_args) - - subproc = Popen(["qsub", *args, "run.sh"], cwd=self.path) - if subproc.wait() != 0: - raise RuntimeError(f"Process submission of {self.moniker} failed") - - -class PBSJob(BatchJob): - def submit(self, env=(("LD_LIBRARY_PATH", INHERIT), ("PYTHONPATH", INHERIT)), - memory_megs=None, extra_args=()): - from subprocess import Popen - args = [ - "-N", self.moniker, - "-d", self.path, - ] - - if memory_megs is not None: - args.extend(["-l", f"pmem={memory_megs}mb"]) - - from os import getenv - - env = dict(env) - for var, value in env.items(): - if value is INHERIT: - value = getenv(var) - - args += ["-v", f"{var}={value}"] - - args.extend(extra_args) - - subproc = Popen(["qsub", *args, "run.sh"], cwd=self.path) - if subproc.wait() != 0: - raise RuntimeError(f"Process submission of {self.moniker} failed") - - -def guess_job_class(): - from subprocess import PIPE, STDOUT, Popen - qstat_helplines = Popen(["qstat", "--help"], - stdout=PIPE, stderr=STDOUT).communicate()[0].split("\n") - if qstat_helplines[0].startswith("GE"): - return GridEngineJob - return PBSJob - - -class ConstructorPlaceholder: - def __init__(self, classname, *args, **kwargs): - self.classname = classname - self.args = args - self.kwargs = kwargs - - def arg(self, i): - return self.args[i] - - def kwarg(self, name): - return self.kwargs[name] - - @override - def __str__(self): - return "{}({})".format(self.classname, - ",".join( - [str(arg) for arg in self.args] - + [f"{kw}={val!r}" - for kw, val in self.kwargs.items()] - ) - ) - __repr__ = __str__ From c9c11876a68aeb706f9ef73a65f9cc46aec2ee03 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 10 Sep 2025 15:23:58 -0500 Subject: [PATCH 2/3] Enable Ruff FURB rules --- pyproject.toml | 1 + pytools/__init__.py | 25 +++++++++++-------------- pytools/convergence.py | 8 ++++---- pytools/debug.py | 16 +++++++++++----- pytools/graph.py | 5 +++-- pytools/graphviz.py | 18 +++++++++--------- pytools/py_codegen.py | 2 +- pytools/test/test_persistent_dict.py | 4 ++-- pytools/test/test_pytools.py | 2 +- 9 files changed, 43 insertions(+), 38 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8823af4e..1976e2e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,6 +78,7 @@ extend-select = [ "TC", # flake8-type-checking "UP", # pyupgrade "W", # pycodestyle + "FURB", ] extend-ignore = [ "C90", # McCabe complexity diff --git a/pytools/__init__.py b/pytools/__init__.py index 1f3035fb..30f818f5 100644 --- a/pytools/__init__.py +++ b/pytools/__init__.py @@ -44,6 +44,7 @@ Sequence, ) from functools import reduce, wraps +from pathlib import Path from sys import intern from typing import ( TYPE_CHECKING, @@ -2144,28 +2145,25 @@ def objname(obj: Any) -> str: return objname(val) -def invoke_editor(s, filename="edit.txt", descr="the file"): +def invoke_editor(s: str, filename: str = "edit.txt", descr: str = "the file"): from tempfile import mkdtemp - tempdir = mkdtemp() + tempdir = Path(mkdtemp()) - from os.path import join - full_name = join(tempdir, filename) + full_path = tempdir / filename - with open(full_name, "w") as outf: - outf.write(str(s)) + full_path.write_text(str(s)) import os if "EDITOR" in os.environ: from subprocess import Popen - p = Popen([os.environ["EDITOR"], full_name]) + p = Popen([os.environ["EDITOR"], full_path]) os.waitpid(p.pid, 0) else: print("(Set the EDITOR environment variable to be " "dropped directly into an editor next time.)") - input(f"Edit {descr} at {full_name} now, then hit [Enter]:") + input(f"Edit {descr} at {full_path} now, then hit [Enter]:") - with open(full_name) as inf: - result = inf.read() + result = full_path.read_text() return result @@ -2514,8 +2512,7 @@ def download_from_web_if_not_present(url: str, local_name: str | None = None) -> with urlopen(req) as inf: contents = inf.read() - with open(local_name, "wb") as outf: - outf.write(contents) + Path(local_name).write_bytes(contents) # }}} @@ -2861,7 +2858,7 @@ def natorder(item: str) -> list[int]: result: list[int] = [] for (int_val, string_val) in re.findall(r"(\d+)|(\D+)", item): if int_val: - result.append(int(int_val)) + result.append(int(int_val)) # noqa: FURB113 # Tie-breaker in case of leading zeros in *int_val*. Longer values # compare smaller to preserve order of numbers in decimal notation, # e.g., "1.001" < "1.01" @@ -2912,7 +2909,7 @@ def identity(x: T) -> str: # https://github.com/python/cpython/commit/1ed61617a4a6632905ad6a0b440cd2cafb8b6414 _DOTTED_WORDS = r"[a-z_]\w*(\.[a-z_]\w*)*" -_NAME_PATTERN = re.compile(f"^({_DOTTED_WORDS})(:({_DOTTED_WORDS})?)?$", re.I) +_NAME_PATTERN = re.compile(f"^({_DOTTED_WORDS})(:({_DOTTED_WORDS})?)?$", re.IGNORECASE) del _DOTTED_WORDS diff --git a/pytools/convergence.py b/pytools/convergence.py index 56e1267d..53d350bd 100644 --- a/pytools/convergence.py +++ b/pytools/convergence.py @@ -148,14 +148,14 @@ def __str__(self): def write_gnuplot_file(self, filename: str) -> None: with open(filename, "w") as outfile: - for absc, err in self.history: - outfile.write(f"{absc:f} {err:f}\n") + outfile.writelines(f"{absc:f} {err:f}\n" for absc, err in self.history) result = self.estimate_order_of_convergence() const = result[0, 0] order = result[0, 1] outfile.write("\n") - for absc, _err in self.history: - outfile.write(f"{absc:f} {const * absc**(-order):f}\n") + outfile.writelines( + f"{absc:f} {const * absc**(-order):f}\n" + for absc, _err in self.history) def stringify_eocs(*eocs: EOCRecorder, diff --git a/pytools/debug.py b/pytools/debug.py index 14f900dd..74641757 100644 --- a/pytools/debug.py +++ b/pytools/debug.py @@ -2,12 +2,18 @@ import contextlib import sys +from collections import UserDict +from typing import TypeVar from typing_extensions import override from pytools import memoize +K = TypeVar("K") +V = TypeVar("V") + + # {{{ debug files ------------------------------------------------------------- def make_unique_filesystem_object(stem, extension="", directory="", @@ -171,9 +177,9 @@ def setup_readline(): setup_readline() -class SetPropagatingDict(dict): +class SetPropagatingDict(UserDict[K, V]): def __init__(self, source_dicts, target_dict): - dict.__init__(self) + super().__init__() for s in source_dicts[::-1]: self.update(s) @@ -181,12 +187,12 @@ def __init__(self, source_dicts, target_dict): @override def __setitem__(self, key, value): - dict.__setitem__(self, key, value) + super().__setitem__(key, value) self.target_dict[key] = value @override def __delitem__(self, key): - dict.__delitem__(self, key) + super().__delitem__(key) del self.target_dict[key] @@ -199,7 +205,7 @@ def shell(locals_=None, globals_=None): if globals_ is None: globals_ = calling_frame.f_globals - ns = SetPropagatingDict([locals_, globals_], locals_) + ns = SetPropagatingDict[str, object]([locals_, globals_], locals_) if HAVE_READLINE: readline.set_completer( diff --git a/pytools/graph.py b/pytools/graph.py index c1cd8aec..41484c2d 100644 --- a/pytools/graph.py +++ b/pytools/graph.py @@ -218,8 +218,9 @@ def compute_sccs(graph: GraphT[NodeT]) -> list[list[NodeT]]: for child in children: if child not in visit_order: # Recurse. - call_stack.append((top, children, child)) - call_stack.append((child, iter(graph[child]), None)) + call_stack.extend(( + (top, children, child), + (child, iter(graph[child]), None))) break if child in visiting: scc_root[top] = min( diff --git a/pytools/graphviz.py b/pytools/graphviz.py index aa49d100..d7e924b1 100644 --- a/pytools/graphviz.py +++ b/pytools/graphviz.py @@ -37,6 +37,7 @@ import html import logging import os +from pathlib import Path logger = logging.getLogger(__name__) @@ -58,7 +59,7 @@ def dot_escape(s: str) -> str: return html.escape(s.replace("\\", "\\\\")) -def show_dot(dot_code: str, output_to: str | None = None) -> str | None: +def show_dot(dot_code: str, output_to: str | None = None) -> Path | None: """ Visualize the graph represented by *dot_code*. @@ -82,13 +83,11 @@ def show_dot(dot_code: str, output_to: str | None = None) -> str | None: import subprocess from tempfile import mkdtemp - temp_dir = mkdtemp(prefix="tmp_pytools_dot") + temp_path = Path(mkdtemp(prefix="tmp_pytools_dot")) dot_file_name = "code.dot" - from os.path import join - with open(join(temp_dir, dot_file_name), "w") as dotf: - dotf.write(dot_code) + (temp_path / dot_file_name).write_text(dot_code) # {{{ preprocess 'output_to' @@ -110,13 +109,13 @@ def show_dot(dot_code: str, output_to: str | None = None) -> str | None: # }}} if output_to == "xwindow": - subprocess.check_call(["dot", "-Tx11", dot_file_name], cwd=temp_dir) + subprocess.check_call(["dot", "-Tx11", dot_file_name], cwd=temp_path) elif output_to in ["browser", "svg"]: svg_file_name = "code.svg" subprocess.check_call(["dot", "-Tsvg", "-o", svg_file_name, dot_file_name], - cwd=temp_dir) + cwd=temp_path) - full_svg_file_name = join(temp_dir, svg_file_name) + full_svg_file_name = temp_path / svg_file_name logger.info("show_dot: svg written to '%s'", full_svg_file_name) if output_to == "svg": @@ -124,12 +123,13 @@ def show_dot(dot_code: str, output_to: str | None = None) -> str | None: assert output_to == "browser" from webbrowser import open as browser_open - browser_open("file://" + full_svg_file_name) + browser_open(full_svg_file_name.as_uri()) else: raise ValueError("`output_to` can be one of 'xwindow', 'browser', or 'svg'," f" got '{output_to}'") return None + # }}} diff --git a/pytools/py_codegen.py b/pytools/py_codegen.py index 3f799ce3..253e1043 100644 --- a/pytools/py_codegen.py +++ b/pytools/py_codegen.py @@ -221,7 +221,7 @@ def __setstate__(self, obj: ( f"(got: {magic!r}, expected: {BYTECODE_VERSION!r})") unique_filename = _linecache_unique_name( - name_prefix if name_prefix else "module", source_code) + name_prefix or "module", source_code) mod_globals = _get_empty_module_dict(unique_filename) mod_globals.update(nondefault_globals) diff --git a/pytools/test/test_persistent_dict.py b/pytools/test/test_persistent_dict.py index 7e45a4b7..8f526ca8 100644 --- a/pytools/test/test_persistent_dict.py +++ b/pytools/test/test_persistent_dict.py @@ -496,7 +496,7 @@ def test_frozenorderedset_hashing() -> None: def test_ABC_hashing() -> None: # noqa: N802 - from abc import ABC, ABCMeta + from abc import ABC keyb = KeyBuilder() @@ -518,7 +518,7 @@ def update_persistent_hash(self, key_hash, key_builder): assert keyb(MyABC2) != keyb(MyABC) assert keyb(MyABC2()) - class MyABC3(metaclass=ABCMeta): # noqa: B024 + class MyABC3(ABC): # noqa: B024 def update_persistent_hash(self, key_hash, key_builder): key_builder.rec(key_hash, 42) diff --git a/pytools/test/test_pytools.py b/pytools/test/test_pytools.py index 4cefc7a1..f6cffc80 100644 --- a/pytools/test/test_pytools.py +++ b/pytools/test/test_pytools.py @@ -617,7 +617,7 @@ def test_unordered_hash(): # FIXME: Use randbytes once >=3.9 is OK lst = [bytes([random.randrange(256) for _ in range(20)]) for _ in range(200)] - lorig = lst[:] + lorig = lst.copy() random.shuffle(lst) from pytools import unordered_hash From af8b231a0fea71520b4b4c7e19422e827f5d5812 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 10 Sep 2025 15:24:47 -0500 Subject: [PATCH 3/3] Update baseline --- .basedpyright/baseline.json | 1132 ++++------------------------------- 1 file changed, 113 insertions(+), 1019 deletions(-) diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 06a3fbbb..16155f43 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -4547,46 +4547,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 18, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 18, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 42, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 23, - "endColumn": 24, - "lineCount": 1 - } - }, { "code": "reportUnannotatedClassAttribute", "range": { @@ -4862,1074 +4822,240 @@ { "code": "reportAny", "range": { - "startColumn": 29, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 12, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 23, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 27, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 18, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 18, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 14, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 9, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 18, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 30, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 31, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 26, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 4, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 11, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 4, - "endColumn": 5, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 18, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 26, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 20, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 28, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 4, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 35, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportAny", - "range": { - "startColumn": 35, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnreachable", - "range": { - "startColumn": 12, - "endColumn": 58, - "lineCount": 1 - } - } - ], - "./pytools/batchjob.py": [ - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 8, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 13, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 13, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 22, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 14, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 38, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 32, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 32, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 43, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 43, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 57, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 57, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 2 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 3 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 4 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 5 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 22, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 15, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 60, - "endColumn": 69, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 59, - "endColumn": 67, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 26, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 26, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 34, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 12, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 18, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 17, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 31, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 56, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 12, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 18, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 17, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 31, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 56, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 63, - "endColumn": 67, + "startColumn": 29, + "endColumn": 32, "lineCount": 1 } }, { - "code": "reportArgumentType", + "code": "reportAny", "range": { - "startColumn": 37, - "endColumn": 41, + "startColumn": 12, + "endColumn": 20, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportAny", "range": { "startColumn": 23, - "endColumn": 32, + "endColumn": 31, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportAny", "range": { - "startColumn": 23, - "endColumn": 32, + "startColumn": 37, + "endColumn": 45, "lineCount": 1 } }, { "code": "reportUnknownParameterType", "range": { - "startColumn": 35, - "endColumn": 39, + "startColumn": 4, + "endColumn": 17, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportUnknownParameterType", "range": { - "startColumn": 35, - "endColumn": 39, + "startColumn": 18, + "endColumn": 19, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportMissingParameterType", "range": { - "startColumn": 43, - "endColumn": 49, + "startColumn": 18, + "endColumn": 19, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportUnknownVariableType", "range": { - "startColumn": 43, - "endColumn": 49, + "startColumn": 4, + "endColumn": 11, "lineCount": 1 } }, { - "code": "reportUnannotatedClassAttribute", + "code": "reportUnknownMemberType", "range": { - "startColumn": 13, - "endColumn": 22, + "startColumn": 14, + "endColumn": 20, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportUnknownVariableType", "range": { - "startColumn": 8, - "endColumn": 17, + "startColumn": 11, + "endColumn": 18, "lineCount": 1 } }, { - "code": "reportUnannotatedClassAttribute", + "code": "reportAny", "range": { - "startColumn": 13, - "endColumn": 17, + "startColumn": 9, + "endColumn": 16, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 8, - "endColumn": 19, + "startColumn": 18, + "endColumn": 28, "lineCount": 1 } }, { - "code": "reportUnannotatedClassAttribute", + "code": "reportAny", "range": { - "startColumn": 13, - "endColumn": 19, + "startColumn": 30, + "endColumn": 37, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportAny", "range": { - "startColumn": 8, - "endColumn": 11, + "startColumn": 31, + "endColumn": 38, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportAny", "range": { - "startColumn": 18, - "endColumn": 19, + "startColumn": 26, + "endColumn": 36, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportAny", "range": { - "startColumn": 18, - "endColumn": 19, + "startColumn": 4, + "endColumn": 16, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 15, - "endColumn": 24, + "startColumn": 11, + "endColumn": 37, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAny", "range": { - "startColumn": 15, - "endColumn": 27, + "startColumn": 4, + "endColumn": 5, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportAny", "range": { - "startColumn": 8, - "endColumn": 13, + "startColumn": 18, + "endColumn": 36, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportAny", "range": { - "startColumn": 20, - "endColumn": 24, + "startColumn": 26, + "endColumn": 35, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportAny", "range": { "startColumn": 20, - "endColumn": 24, + "endColumn": 62, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 15, - "endColumn": 26, + "startColumn": 28, + "endColumn": 61, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 15, - "endColumn": 32, + "startColumn": 11, + "endColumn": 29, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 31, - "endColumn": 45, + "startColumn": 11, + "endColumn": 34, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportUnknownVariableType", "range": { - "startColumn": 25, - "endColumn": 28, + "startColumn": 11, + "endColumn": 36, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAny", "range": { - "startColumn": 34, - "endColumn": 37, + "startColumn": 4, + "endColumn": 16, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 41, - "endColumn": 50, + "startColumn": 4, + "endColumn": 7, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAny", "range": { - "startColumn": 32, - "endColumn": 35, + "startColumn": 35, + "endColumn": 38, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 39, - "endColumn": 50, + "startColumn": 35, + "endColumn": 38, "lineCount": 1 } }, { - "code": "reportUnannotatedClassAttribute", + "code": "reportUnreachable", "range": { - "startColumn": 4, - "endColumn": 12, + "startColumn": 12, + "endColumn": 58, "lineCount": 1 } } @@ -7333,14 +6459,6 @@ "lineCount": 1 } }, - { - "code": "reportMissingTypeArgument", - "range": { - "startColumn": 25, - "endColumn": 29, - "lineCount": 1 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -7373,14 +6491,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 21, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -7390,18 +6500,18 @@ } }, { - "code": "reportUnknownMemberType", + "code": "reportUnknownArgumentType", "range": { - "startColumn": 12, - "endColumn": 23, + "startColumn": 24, + "endColumn": 25, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 24, - "endColumn": 25, + "startColumn": 8, + "endColumn": 24, "lineCount": 1 } }, @@ -7445,35 +6555,27 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 24, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { - "startColumn": 31, - "endColumn": 34, + "startColumn": 28, + "endColumn": 31, "lineCount": 1 } }, { "code": "reportUnknownArgumentType", "range": { - "startColumn": 36, - "endColumn": 41, + "startColumn": 33, + "endColumn": 38, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 26, - "endColumn": 29, + "startColumn": 8, + "endColumn": 24, "lineCount": 1 } }, @@ -7488,16 +6590,8 @@ { "code": "reportUnknownMemberType", "range": { - "startColumn": 8, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 31, - "endColumn": 34, + "startColumn": 12, + "endColumn": 28, "lineCount": 1 } }, @@ -7534,34 +6628,34 @@ } }, { - "code": "reportUnknownArgumentType", + "code": "reportPossiblyUnboundVariable", "range": { - "startColumn": 28, - "endColumn": 47, + "startColumn": 8, + "endColumn": 16, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportPossiblyUnboundVariable", "range": { - "startColumn": 49, - "endColumn": 56, + "startColumn": 16, + "endColumn": 27, "lineCount": 1 } }, { - "code": "reportPossiblyUnboundVariable", + "code": "reportArgumentType", "range": { - "startColumn": 8, - "endColumn": 16, + "startColumn": 38, + "endColumn": 40, "lineCount": 1 } }, { - "code": "reportPossiblyUnboundVariable", + "code": "reportArgumentType", "range": { - "startColumn": 16, - "endColumn": 27, + "startColumn": 30, + "endColumn": 32, "lineCount": 1 } },