diff --git a/sapp/bulk_saver.py b/sapp/bulk_saver.py index 6472ade0..941f5824 100644 --- a/sapp/bulk_saver.py +++ b/sapp/bulk_saver.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """Bulk saving objects for performance """ diff --git a/sapp/cli.py b/sapp/cli.py index dd068ca1..eb5982f3 100755 --- a/sapp/cli.py +++ b/sapp/cli.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import os from typing import Dict, Type diff --git a/sapp/cli_lib.py b/sapp/cli_lib.py index a5548c72..4204ade8 100644 --- a/sapp/cli_lib.py +++ b/sapp/cli_lib.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import os import pathlib diff --git a/sapp/db.py b/sapp/db.py index 648265e9..f2598b64 100644 --- a/sapp/db.py +++ b/sapp/db.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ This file defines the underlying db used by SAPP library. """ diff --git a/sapp/db_support.py b/sapp/db_support.py index 1e38b6c4..00117a94 100644 --- a/sapp/db_support.py +++ b/sapp/db_support.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import logging diff --git a/sapp/errors.py b/sapp/errors.py index fba5547e..07278646 100644 --- a/sapp/errors.py +++ b/sapp/errors.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + TYPECHECK_ERROR = 102 diff --git a/sapp/filesystem.py b/sapp/filesystem.py index 267ced8a..593365e6 100644 --- a/sapp/filesystem.py +++ b/sapp/filesystem.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os from pathlib import Path from typing import List, Optional diff --git a/sapp/iterutil.py b/sapp/iterutil.py index c05f08fa..7f83259b 100644 --- a/sapp/iterutil.py +++ b/sapp/iterutil.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import itertools from typing import Iterable, Iterator, List, TypeVar diff --git a/sapp/lint.py b/sapp/lint.py index 21cc5047..d8667c10 100644 --- a/sapp/lint.py +++ b/sapp/lint.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from operator import itemgetter from pathlib import Path diff --git a/sapp/operating_system.py b/sapp/operating_system.py index e716122e..e1d00d31 100644 --- a/sapp/operating_system.py +++ b/sapp/operating_system.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Operating system-related utilities. """ diff --git a/sapp/pipeline/__init__.py b/sapp/pipeline/__init__.py index d1341b78..e782ed64 100644 --- a/sapp/pipeline/__init__.py +++ b/sapp/pipeline/__init__.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import sys from abc import ABCMeta, abstractmethod diff --git a/sapp/pipeline/add_features.py b/sapp/pipeline/add_features.py index 38b0ab83..0a7d5d7c 100644 --- a/sapp/pipeline/add_features.py +++ b/sapp/pipeline/add_features.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import List, Optional, Set, Tuple diff --git a/sapp/pipeline/add_reverse_traces.py b/sapp/pipeline/add_reverse_traces.py index a1fff302..3867ff76 100644 --- a/sapp/pipeline/add_reverse_traces.py +++ b/sapp/pipeline/add_reverse_traces.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from collections import deque from typing import Set, Tuple diff --git a/sapp/pipeline/base_parser.py b/sapp/pipeline/base_parser.py index 2505551d..ece611b7 100644 --- a/sapp/pipeline/base_parser.py +++ b/sapp/pipeline/base_parser.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """Abstract Parser for Zoncolan like output""" import json diff --git a/sapp/pipeline/create_database.py b/sapp/pipeline/create_database.py index b844971c..20011d4e 100644 --- a/sapp/pipeline/create_database.py +++ b/sapp/pipeline/create_database.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import Tuple diff --git a/sapp/pipeline/database_saver.py b/sapp/pipeline/database_saver.py index 0f8a3e0f..6fc1d6c7 100644 --- a/sapp/pipeline/database_saver.py +++ b/sapp/pipeline/database_saver.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + #!/usr/bin/env python3 import collections diff --git a/sapp/pipeline/issue_callable_filter.py b/sapp/pipeline/issue_callable_filter.py index ce9cee05..c91c7da5 100644 --- a/sapp/pipeline/issue_callable_filter.py +++ b/sapp/pipeline/issue_callable_filter.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Set, Tuple from . import DictEntries, ParseIssueTuple, PipelineStep, Summary diff --git a/sapp/pipeline/issue_handle_filter.py b/sapp/pipeline/issue_handle_filter.py index 55a782f9..8832ee1e 100644 --- a/sapp/pipeline/issue_handle_filter.py +++ b/sapp/pipeline/issue_handle_filter.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Set, Tuple from . import DictEntries, ParseIssueTuple, PipelineStep, Summary diff --git a/sapp/pipeline/mariana_trench_parser.py b/sapp/pipeline/mariana_trench_parser.py index 91b07ba4..5aea6039 100644 --- a/sapp/pipeline/mariana_trench_parser.py +++ b/sapp/pipeline/mariana_trench_parser.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json import logging import sys diff --git a/sapp/pipeline/mariana_trench_parser_objects.py b/sapp/pipeline/mariana_trench_parser_objects.py index 9b3683ce..df145c94 100644 --- a/sapp/pipeline/mariana_trench_parser_objects.py +++ b/sapp/pipeline/mariana_trench_parser_objects.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import re diff --git a/sapp/pipeline/meta_run_issue_duplicate_filter.py b/sapp/pipeline/meta_run_issue_duplicate_filter.py index f5817f51..13b41f92 100644 --- a/sapp/pipeline/meta_run_issue_duplicate_filter.py +++ b/sapp/pipeline/meta_run_issue_duplicate_filter.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import Tuple diff --git a/sapp/pipeline/model_generator.py b/sapp/pipeline/model_generator.py index 6d748389..5abbe21f 100644 --- a/sapp/pipeline/model_generator.py +++ b/sapp/pipeline/model_generator.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import datetime import json diff --git a/sapp/pipeline/parallel_parser.py b/sapp/pipeline/parallel_parser.py index b7752016..9f7a2ef6 100644 --- a/sapp/pipeline/parallel_parser.py +++ b/sapp/pipeline/parallel_parser.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from multiprocessing import Pool from typing import Iterable, List, Set, Tuple, Type, Union diff --git a/sapp/pipeline/pysa_taint_parser.py b/sapp/pipeline/pysa_taint_parser.py index d57e8bb3..b93c52f6 100644 --- a/sapp/pipeline/pysa_taint_parser.py +++ b/sapp/pipeline/pysa_taint_parser.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """Parse Pysa/Taint output for Zoncolan processing""" import json diff --git a/sapp/pipeline/tests/issue_callable_filter_test.py b/sapp/pipeline/tests/issue_callable_filter_test.py index ddad8c42..4206ebe0 100644 --- a/sapp/pipeline/tests/issue_callable_filter_test.py +++ b/sapp/pipeline/tests/issue_callable_filter_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from .. import ParseIssueTuple, Pipeline diff --git a/sapp/pipeline/tests/issue_handle_filter_test.py b/sapp/pipeline/tests/issue_handle_filter_test.py index 096381c9..77070023 100644 --- a/sapp/pipeline/tests/issue_handle_filter_test.py +++ b/sapp/pipeline/tests/issue_handle_filter_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from .. import ParseIssueTuple, Pipeline diff --git a/sapp/pipeline/tests/test_mariana_trench_parser.py b/sapp/pipeline/tests/test_mariana_trench_parser.py index e48f1684..1728149b 100644 --- a/sapp/pipeline/tests/test_mariana_trench_parser.py +++ b/sapp/pipeline/tests/test_mariana_trench_parser.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import io import unittest from typing import Iterable, Union diff --git a/sapp/pipeline/tests/test_pysa_taint_parser.py b/sapp/pipeline/tests/test_pysa_taint_parser.py index 6de9b016..c330f06c 100644 --- a/sapp/pipeline/tests/test_pysa_taint_parser.py +++ b/sapp/pipeline/tests/test_pysa_taint_parser.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import io import sys import unittest diff --git a/sapp/pipeline/tests/warning_code_filter_test.py b/sapp/pipeline/tests/warning_code_filter_test.py index 370b63aa..f1c714a2 100644 --- a/sapp/pipeline/tests/warning_code_filter_test.py +++ b/sapp/pipeline/tests/warning_code_filter_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from .. import ParseIssueTuple, Pipeline diff --git a/sapp/pipeline/trim_trace_graph.py b/sapp/pipeline/trim_trace_graph.py index 73e62338..37c1c0a6 100644 --- a/sapp/pipeline/trim_trace_graph.py +++ b/sapp/pipeline/trim_trace_graph.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import Tuple diff --git a/sapp/pipeline/warning_code_filter.py b/sapp/pipeline/warning_code_filter.py index 837af517..1b7e1dd2 100644 --- a/sapp/pipeline/warning_code_filter.py +++ b/sapp/pipeline/warning_code_filter.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Set, Tuple from . import DictEntries, ParseIssueTuple, PipelineStep, Summary diff --git a/sapp/sharded_files.py b/sapp/sharded_files.py index 528ab02f..69d200f5 100644 --- a/sapp/sharded_files.py +++ b/sapp/sharded_files.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import fnmatch import os import re diff --git a/sapp/tests/bulk_saver_test.py b/sapp/tests/bulk_saver_test.py index b4f4605a..1add54ce 100644 --- a/sapp/tests/bulk_saver_test.py +++ b/sapp/tests/bulk_saver_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from pyre_extensions import none_throws diff --git a/sapp/tests/cli_test.py b/sapp/tests/cli_test.py index b5318b2c..e1ce0a54 100644 --- a/sapp/tests/cli_test.py +++ b/sapp/tests/cli_test.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import contextlib import os import tempfile diff --git a/sapp/tests/db_support_test.py b/sapp/tests/db_support_test.py index 1ba35307..0744aed7 100644 --- a/sapp/tests/db_support_test.py +++ b/sapp/tests/db_support_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from ..db_support import DBID diff --git a/sapp/tests/decorators_test.py b/sapp/tests/decorators_test.py index 761c0b35..bb8d82c3 100644 --- a/sapp/tests/decorators_test.py +++ b/sapp/tests/decorators_test.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Generator from unittest import mock, TestCase diff --git a/sapp/tests/filter_test.py b/sapp/tests/filter_test.py index 1996b8ed..ec0b0422 100644 --- a/sapp/tests/filter_test.py +++ b/sapp/tests/filter_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from unittest import TestCase diff --git a/sapp/tests/iterutil_test.py b/sapp/tests/iterutil_test.py index 8162e7fb..86c3537a 100644 --- a/sapp/tests/iterutil_test.py +++ b/sapp/tests/iterutil_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from ..iterutil import split_every diff --git a/sapp/tests/primary_key_generator_test.py b/sapp/tests/primary_key_generator_test.py index 19bb7bc7..f4064f1d 100644 --- a/sapp/tests/primary_key_generator_test.py +++ b/sapp/tests/primary_key_generator_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from tools.sapp.sapp.models import IssueDBID, SharedText, TraceFrame diff --git a/sapp/tests/sharded_files/sharded_files_test.py b/sapp/tests/sharded_files/sharded_files_test.py index 972f1e60..03a2e762 100644 --- a/sapp/tests/sharded_files/sharded_files_test.py +++ b/sapp/tests/sharded_files/sharded_files_test.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os import unittest diff --git a/sapp/trimmed_trace_graph.py b/sapp/trimmed_trace_graph.py index 40b02aef..16f528c2 100644 --- a/sapp/trimmed_trace_graph.py +++ b/sapp/trimmed_trace_graph.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from collections import Counter from dataclasses import dataclass diff --git a/sapp/ui/filter_predicates.py b/sapp/ui/filter_predicates.py index 19f8c93f..ea116457 100644 --- a/sapp/ui/filter_predicates.py +++ b/sapp/ui/filter_predicates.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import re diff --git a/sapp/ui/interactive.py b/sapp/ui/interactive.py index 1076a373..fb5061c4 100644 --- a/sapp/ui/interactive.py +++ b/sapp/ui/interactive.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import builtins diff --git a/sapp/ui/issues.py b/sapp/ui/issues.py index d407ceb1..1610bd95 100644 --- a/sapp/ui/issues.py +++ b/sapp/ui/issues.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import List, Optional, Set diff --git a/sapp/ui/query_result.py b/sapp/ui/query_result.py index 63368913..f7fedaab 100644 --- a/sapp/ui/query_result.py +++ b/sapp/ui/query_result.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import datetime from typing import Any, Dict, FrozenSet, List, NamedTuple, Set, Union diff --git a/sapp/ui/run.py b/sapp/ui/run.py index 83d46b67..a5dc029a 100644 --- a/sapp/ui/run.py +++ b/sapp/ui/run.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List import graphene diff --git a/sapp/ui/schema.py b/sapp/ui/schema.py index f6120fc2..7f9ea16c 100644 --- a/sapp/ui/schema.py +++ b/sapp/ui/schema.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os from pathlib import Path from typing import Any, Dict, List, Optional, Union diff --git a/sapp/ui/tests/issues_test.py b/sapp/ui/tests/issues_test.py index 6415815e..c2ec3f42 100644 --- a/sapp/ui/tests/issues_test.py +++ b/sapp/ui/tests/issues_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from ... import queries diff --git a/sapp/ui/tests/run_test.py b/sapp/ui/tests/run_test.py index 10dfd9c3..a953e0c5 100644 --- a/sapp/ui/tests/run_test.py +++ b/sapp/ui/tests/run_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import TestCase from ...db import DB, DBType diff --git a/sapp/ui/tests/trace_test.py b/sapp/ui/tests/trace_test.py index 54f34469..8c5faf61 100644 --- a/sapp/ui/tests/trace_test.py +++ b/sapp/ui/tests/trace_test.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, List from unittest import TestCase diff --git a/sapp/ui/trace.py b/sapp/ui/trace.py index 31348aff..8f0080f8 100644 --- a/sapp/ui/trace.py +++ b/sapp/ui/trace.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import ( Any, Dict, diff --git a/sapp/ui/typeahead.py b/sapp/ui/typeahead.py index 86715657..6c5eb988 100644 --- a/sapp/ui/typeahead.py +++ b/sapp/ui/typeahead.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import List