Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"exclude": [
// test cases use a custom pyrightconfig file
"**/@tests/test_cases",
"stdlib/__main__.pyi",
"stdlib/distutils/command",
"stdlib/distutils/dist.pyi",
"stdlib/encodings/__init__.pyi",
"stdlib/lib2to3/fixes/*.pyi",
"stdlib/numbers.pyi",
"stdlib/optparse.pyi",
Expand Down Expand Up @@ -38,6 +40,7 @@
"stubs/defusedxml",
"stubs/docker",
"stubs/docutils",
"stubs/flake8-typing-imports",
"stubs/Flask-SocketIO",
"stubs/fpdf2",
"stubs/gdb",
Expand Down Expand Up @@ -79,6 +82,7 @@
"stubs/Pygments",
"stubs/PyMySQL",
"stubs/python-crontab",
"stubs/python-datemath",
"stubs/python-dateutil",
"stubs/python-http-client",
"stubs/python-jose",
Expand Down
4 changes: 1 addition & 3 deletions stdlib/__main__.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from typing import Any

def __getattr__(name: str) -> Any: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stdlib/encodings/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from codecs import CodecInfo

class CodecRegistryError(LookupError, SystemError): ...
Expand All @@ -7,4 +6,4 @@ def normalize_encoding(encoding: str | bytes) -> str: ...
def search_function(encoding: str) -> CodecInfo | None: ...

# Needed for submodules
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 2 additions & 2 deletions stubs/Pygments/pygments/lexers/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import FileDescriptorOrPath, Incomplete, StrPath
from _typeshed import FileDescriptorOrPath, StrPath
from collections.abc import Iterator
from typing import Any

Expand All @@ -16,4 +16,4 @@ def guess_lexer_for_filename(_fn: StrPath, _text: str, **options: Any) -> Lexer:
def guess_lexer(_text: str | bytes, **options: Any) -> Lexer: ...

# Having every lexer class here doesn't seem to be worth it
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stubs/Pygments/pygments/styles/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from collections.abc import Iterator, Mapping

from pygments.style import Style
Expand All @@ -10,4 +9,4 @@ def get_style_by_name(name) -> type[Style]: ...
def get_all_styles() -> Iterator[str]: ...

# Having every style class here doesn't seem to be worth it
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/examples.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/parsers/recommonmark_wrapper.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/parsers/rst/directives/body.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/parsers/rst/directives/html.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/parsers/rst/directives/images.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/parsers/rst/directives/tables.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/docutils/docutils/parsers/rst/states.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ class Inliner:
def implicit_inline(self, text: str, lineno: int) -> list[nodes.Text]: ...
dispatch: dict[str, Callable[[Match[str], int], tuple[str, list[nodes.problematic], str, list[nodes.system_message]]]] = ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/readers/pep.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/readers/standalone.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/docutils/docutils/transforms/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class Transformer:
def add_transform(self, transform_class: type[Transform], priority: int | None = None, **kwargs) -> None: ...
def __getattr__(self, name: str, /) -> Incomplete: ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/docutils_xml.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/html4css1.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/html5_polyglot.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stubs/docutils/docutils/writers/latex2e.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from typing import ClassVar

from docutils.utils import Reporter
Expand All @@ -17,4 +16,4 @@ class Babel:
def language_name(self, language_code: str) -> str: ...
def get_language(self) -> str: ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/manpage.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/null.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/odf_odt.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/pep_html.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/pseudoxml.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/s5_html.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/docutils/docutils/writers/xetex.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stubs/flake8-typing-imports/flake8_typing_imports.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import argparse
import ast
from _typeshed import Incomplete
from collections.abc import Generator
from typing import Any, ClassVar

Expand All @@ -14,4 +13,4 @@ class Plugin:
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]: ...

def __getattr__(name: str) -> Incomplete: ... # incomplete (other attributes are normally not accessed)
def __getattr__(name: str): ... # incomplete module (other attributes are normally not accessed)
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/breakpoint.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/bt.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/disassemble.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/evaluate.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/events.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/frames.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/io.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/launch.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/locations.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/memory.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/modules.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/next.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/pause.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/scopes.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/server.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/sources.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/startup.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/state.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/threads.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/typecheck.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/gdb/gdb/dap/varref.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from _typeshed import Incomplete

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/python-datemath/datemath/helpers.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from _typeshed import Incomplete

import arrow

class DateMathException(Exception): ...

def parse(
expression: str, now: arrow.Arrow | None = None, tz: str = "UTC", type: str | None = None, roundDown: bool = True
) -> arrow.Arrow: ...
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/tensorflow/tensorflow/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -432,4 +432,4 @@ def gather_nd(
name: str | None = None,
bad_indices_policy: Literal["", "DEFAULT", "ERROR", "IGNORE"] = "",
) -> Tensor: ...
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stubs/tensorflow/tensorflow/config/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from typing import NamedTuple

from tensorflow.config import experimental as experimental
Expand All @@ -10,4 +9,4 @@ class PhysicalDevice(NamedTuple):
def list_physical_devices(device_type: None | str = None) -> list[PhysicalDevice]: ...
def get_visible_devices(device_type: None | str = None) -> list[PhysicalDevice]: ...
def set_visible_devices(devices: list[PhysicalDevice] | PhysicalDevice, device_type: None | str = None) -> None: ...
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stubs/tensorflow/tensorflow/config/experimental.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import typing_extensions
from _typeshed import Incomplete
from typing import TypedDict

from tensorflow.config import PhysicalDevice
Expand All @@ -14,4 +13,4 @@ def reset_memory_stats(device: str) -> None: ...
def get_memory_usage(device: PhysicalDevice) -> int: ...
def get_memory_growth(device: PhysicalDevice) -> bool: ...
def set_memory_growth(device: PhysicalDevice, enable: bool) -> None: ...
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/tensorflow/tensorflow/data/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,4 @@ class TFRecordDataset(Dataset[tf.Tensor]):
@property
def element_spec(self) -> tf.TensorSpec: ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
3 changes: 1 addition & 2 deletions stubs/tensorflow/tensorflow/data/experimental.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from collections.abc import Callable, Sequence
from typing import Final, TypeVar

Expand Down Expand Up @@ -30,4 +29,4 @@ def sample_from_datasets(
seed: int | None = None,
stop_on_empty_dataset: bool = False,
) -> Dataset[_T1]: ...
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/tensorflow/tensorflow/distribute/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from _typeshed import Incomplete

from tensorflow.python.distribute.distribute_lib import Strategy as Strategy

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
4 changes: 1 addition & 3 deletions stubs/tensorflow/tensorflow/distribute/coordinator.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from _typeshed import Incomplete

from .experimental.coordinator import RemoteValue as RemoteValue

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from typing import Generic, TypeVar

from tensorflow._aliases import AnyArray
Expand All @@ -9,4 +8,4 @@ class RemoteValue(Generic[_Value_co]):
def fetch(self) -> AnyArray: ...
def get(self) -> _Value_co: ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/tensorflow/tensorflow/dtypes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ quint16: DType
string: DType

def as_dtype(type_value: DTypeLike) -> DType: ...
def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/tensorflow/tensorflow/experimental/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ _T_co = TypeVar("_T_co", covariant=True)
class Optional(ABC, Generic[_T_co]):
def __getattr__(self, name: str) -> Incomplete: ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
2 changes: 1 addition & 1 deletion stubs/tensorflow/tensorflow/experimental/dtensor.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class Mesh:
use_xla_spmd: bool = False,
) -> None: ...

def __getattr__(name: str) -> Incomplete: ...
def __getattr__(name: str): ... # incomplete module
Loading