From 80d24c835b7de7706d9a81b95ab600513f0c929d Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sat, 19 Oct 2024 16:52:29 -0700 Subject: [PATCH] Updated typeshed stubs to the latest version. --- .../src/tests/samples/subscript1.py | 9 +- .../src/tests/typeEvaluator6.test.ts | 2 +- .../typeshed-fallback/README.md | 2 +- .../typeshed-fallback/commit.txt | 2 +- .../typeshed-fallback/stdlib/VERSIONS | 2 + .../typeshed-fallback/stdlib/_asyncio.pyi | 120 ++++ .../typeshed-fallback/stdlib/_csv.pyi | 3 +- .../typeshed-fallback/stdlib/_ctypes.pyi | 5 +- .../typeshed-fallback/stdlib/_io.pyi | 195 ++++++ .../typeshed-fallback/stdlib/_operator.pyi | 42 +- .../stdlib/asyncio/events.pyi | 11 +- .../stdlib/asyncio/futures.pyi | 47 +- .../stdlib/asyncio/streams.pyi | 4 +- .../stdlib/asyncio/tasks.pyi | 74 +-- .../typeshed-fallback/stdlib/builtins.pyi | 12 +- .../typeshed-fallback/stdlib/bz2.pyi | 2 +- .../typeshed-fallback/stdlib/code.pyi | 6 +- .../stdlib/collections/__init__.pyi | 15 +- .../typeshed-fallback/stdlib/csv.pyi | 15 +- .../stdlib/distutils/command/bdist.pyi | 16 +- .../stdlib/distutils/command/bdist_dumb.pyi | 17 +- .../stdlib/distutils/command/bdist_msi.pyi | 35 +- .../stdlib/distutils/command/bdist_rpm.pyi | 71 +- .../stdlib/distutils/command/build.pyi | 22 +- .../stdlib/distutils/command/build_clib.pyi | 20 +- .../stdlib/distutils/command/build_ext.pyi | 48 +- .../stdlib/distutils/command/build_py.pyi | 23 +- .../distutils/command/build_scripts.pyi | 15 +- .../stdlib/distutils/command/check.pyi | 5 +- .../stdlib/distutils/command/clean.pyi | 15 +- .../stdlib/distutils/command/config.pyi | 6 +- .../stdlib/distutils/command/install.pyi | 41 +- .../stdlib/distutils/command/install_data.pyi | 11 +- .../distutils/command/install_egg_info.pyi | 9 +- .../distutils/command/install_headers.pyi | 7 +- .../stdlib/distutils/command/install_lib.pyi | 13 +- .../distutils/command/install_scripts.pyi | 11 +- .../stdlib/distutils/command/register.pyi | 3 +- .../stdlib/distutils/command/sdist.pyi | 18 +- .../stdlib/distutils/command/upload.pyi | 9 +- .../stdlib/distutils/core.pyi | 7 +- .../stdlib/distutils/log.pyi | 1 + .../stdlib/email/message.pyi | 13 +- .../typeshed-fallback/stdlib/enum.pyi | 15 +- .../typeshed-fallback/stdlib/fileinput.pyi | 6 +- .../typeshed-fallback/stdlib/hmac.pyi | 7 +- .../typeshed-fallback/stdlib/http/client.pyi | 8 +- .../stdlib/http/cookiejar.pyi | 4 +- .../typeshed-fallback/stdlib/io.pyi | 233 +------ .../typeshed-fallback/stdlib/ipaddress.pyi | 4 +- .../typeshed-fallback/stdlib/itertools.pyi | 49 +- .../stdlib/logging/config.pyi | 2 +- .../typeshed-fallback/stdlib/mmap.pyi | 4 +- .../stdlib/multiprocessing/pool.pyi | 4 +- .../typeshed-fallback/stdlib/operator.pyi | 104 ++- .../typeshed-fallback/stdlib/optparse.pyi | 4 +- .../typeshed-fallback/stdlib/os/__init__.pyi | 27 +- .../typeshed-fallback/stdlib/pickle.pyi | 14 +- .../typeshed-fallback/stdlib/posixpath.pyi | 16 +- .../typeshed-fallback/stdlib/re.pyi | 22 +- .../typeshed-fallback/stdlib/shlex.pyi | 2 +- .../stdlib/sqlite3/__init__.pyi | 8 +- .../typeshed-fallback/stdlib/subprocess.pyi | 4 +- .../stdlib/tkinter/__init__.pyi | 6 +- .../typeshed-fallback/stdlib/tkinter/ttk.pyi | 4 +- .../typeshed-fallback/stdlib/traceback.pyi | 4 +- .../typeshed-fallback/stdlib/types.pyi | 8 +- .../stdlib/unittest/runner.pyi | 3 +- .../stdlib/unittest/suite.pyi | 2 +- .../typeshed-fallback/stdlib/weakref.pyi | 8 +- .../stubs/beautifulsoup4/bs4/element.pyi | 13 +- .../stubs/boto/METADATA.toml | 7 - .../stubs/boto/boto/__init__.pyi | 143 ---- .../stubs/boto/boto/auth.pyi | 112 ---- .../stubs/boto/boto/auth_handler.pyi | 10 - .../stubs/boto/boto/compat.pyi | 8 - .../stubs/boto/boto/connection.pyi | 178 ----- .../stubs/boto/boto/ec2/__init__.pyi | 11 - .../stubs/boto/boto/elb/__init__.pyi | 59 -- .../stubs/boto/boto/exception.pyi | 148 ----- .../stubs/boto/boto/kms/__init__.pyi | 4 - .../stubs/boto/boto/kms/exceptions.pyi | 17 - .../stubs/boto/boto/kms/layer1.pyi | 78 --- .../stubs/boto/boto/plugin.pyi | 10 - .../stubs/boto/boto/regioninfo.pyi | 23 - .../stubs/boto/boto/s3/__init__.pyi | 16 - .../stubs/boto/boto/s3/acl.pyi | 49 -- .../stubs/boto/boto/s3/bucket.pyi | 192 ------ .../boto/boto/s3/bucketlistresultset.pyi | 86 --- .../stubs/boto/boto/s3/bucketlogging.pyi | 14 - .../stubs/boto/boto/s3/connection.pyi | 142 ---- .../stubs/boto/boto/s3/cors.pyi | 36 -- .../stubs/boto/boto/s3/deletemarker.pyi | 13 - .../stubs/boto/boto/s3/key.pyi | 235 ------- .../stubs/boto/boto/s3/keyfile.pyi | 29 - .../stubs/boto/boto/s3/lifecycle.pyi | 70 -- .../stubs/boto/boto/s3/multidelete.pyi | 40 -- .../stubs/boto/boto/s3/multipart.pyi | 74 --- .../stubs/boto/boto/s3/prefix.pyi | 11 - .../stubs/boto/boto/s3/tagging.pyi | 23 - .../stubs/boto/boto/s3/user.pyi | 11 - .../stubs/boto/boto/s3/website.pyi | 83 --- .../stubs/boto/boto/utils.pyi | 147 ----- .../stubs/flake8-typing-imports/METADATA.toml | 2 +- .../stubs/fpdf2/METADATA.toml | 2 +- .../stubs/fpdf2/fpdf/__init__.pyi | 3 +- .../stubs/fpdf2/fpdf/drawing.pyi | 8 +- .../stubs/fpdf2/fpdf/enums.pyi | 6 +- .../stubs/fpdf2/fpdf/fonts.pyi | 38 +- .../stubs/fpdf2/fpdf/fpdf.pyi | 110 ++-- .../stubs/fpdf2/fpdf/html.pyi | 47 +- .../stubs/fpdf2/fpdf/image_datastructures.pyi | 5 +- .../stubs/fpdf2/fpdf/line_break.pyi | 6 +- .../stubs/fpdf2/fpdf/outline.pyi | 2 +- .../stubs/fpdf2/fpdf/table.pyi | 2 +- .../stubs/fpdf2/fpdf/template.pyi | 6 +- .../stubs/fpdf2/fpdf/text_region.pyi | 24 +- .../stubs/fpdf2/fpdf/unicode_script.pyi | 172 +++++ .../typeshed-fallback/stubs/gdb/METADATA.toml | 2 +- .../stubs/gdb/gdb/FrameDecorator.pyi | 9 +- .../stubs/gdb/gdb/FrameIterator.pyi | 1 - .../stubs/gdb/gdb/__init__.pyi | 177 +++-- .../stubs/gdb/gdb/dap/__init__.pyi | 13 + .../stubs/gdb/gdb/dap/breakpoint.pyi | 3 + .../stubs/gdb/gdb/dap/bt.pyi | 3 + .../stubs/gdb/gdb/dap/disassemble.pyi | 3 + .../stubs/gdb/gdb/dap/evaluate.pyi | 3 + .../stubs/gdb/gdb/dap/events.pyi | 3 + .../stubs/gdb/gdb/dap/frames.pyi | 3 + .../stubs/gdb/gdb/dap/io.pyi | 3 + .../stubs/gdb/gdb/dap/launch.pyi | 3 + .../stubs/gdb/gdb/dap/locations.pyi | 3 + .../stubs/gdb/gdb/dap/memory.pyi | 3 + .../stubs/gdb/gdb/dap/modules.pyi | 3 + .../stubs/gdb/gdb/dap/next.pyi | 3 + .../stubs/gdb/gdb/dap/pause.pyi | 3 + .../stubs/gdb/gdb/dap/scopes.pyi | 3 + .../stubs/gdb/gdb/dap/server.pyi | 3 + .../stubs/gdb/gdb/dap/sources.pyi | 3 + .../stubs/gdb/gdb/dap/startup.pyi | 3 + .../stubs/gdb/gdb/dap/state.pyi | 3 + .../stubs/gdb/gdb/dap/threads.pyi | 3 + .../stubs/gdb/gdb/dap/typecheck.pyi | 3 + .../stubs/gdb/gdb/dap/varref.pyi | 3 + .../stubs/gdb/gdb/disassembler.pyi | 57 ++ .../stubs/gdb/gdb/events.pyi | 84 +-- .../stubs/gdb/gdb/missing_debug.pyi | 12 + .../stubs/gdb/gdb/printing.pyi | 25 + .../stubs/gdb/gdb/unwinder.pyi | 12 +- .../stubs/gevent/METADATA.toml | 2 +- .../{monkey.pyi => monkey/__init__.pyi} | 5 +- .../stubs/gevent/gevent/monkey/api.pyi | 7 + .../stubs/gevent/gevent/queue.pyi | 10 +- .../stubs/gevent/gevent/timeout.pyi | 7 +- .../stubs/html5lib/html5lib/serializer.pyi | 3 +- .../stubs/icalendar/icalendar/__init__.pyi | 6 + .../stubs/icalendar/icalendar/cal.pyi | 44 ++ .../stubs/networkx/METADATA.toml | 2 +- .../stubs/networkx/networkx/__init__.pyi | 2 +- .../algorithms/approximation/clique.pyi | 10 +- .../approximation/clustering_coefficient.pyi | 4 +- .../algorithms/approximation/connectivity.pyi | 8 +- .../approximation/distance_measures.pyi | 4 +- .../approximation/dominating_set.pyi | 6 +- .../algorithms/approximation/kcomponents.pyi | 4 +- .../algorithms/approximation/matching.pyi | 4 +- .../algorithms/approximation/maxcut.pyi | 6 +- .../algorithms/approximation/ramsey.pyi | 4 +- .../algorithms/approximation/steinertree.pyi | 6 +- .../approximation/traveling_salesman.pyi | 16 +- .../algorithms/approximation/treewidth.pyi | 6 +- .../algorithms/approximation/vertex_cover.pyi | 4 +- .../algorithms/assortativity/connectivity.pyi | 4 +- .../algorithms/assortativity/correlation.pyi | 10 +- .../algorithms/assortativity/mixing.pyi | 12 +- .../assortativity/neighbor_degree.pyi | 4 +- .../algorithms/assortativity/pairs.pyi | 6 +- .../networkx/algorithms/asteroidal.pyi | 6 +- .../networkx/algorithms/bipartite/basic.pyi | 14 +- .../algorithms/bipartite/centrality.pyi | 8 +- .../networkx/algorithms/bipartite/cluster.pyi | 8 +- .../algorithms/bipartite/covering.pyi | 4 +- .../algorithms/bipartite/edgelist.pyi | 10 +- .../algorithms/bipartite/generators.pyi | 18 +- .../algorithms/bipartite/matching.pyi | 10 +- .../networkx/algorithms/bipartite/matrix.pyi | 6 +- .../algorithms/bipartite/projection.pyi | 12 +- .../algorithms/bipartite/redundancy.pyi | 4 +- .../algorithms/bipartite/spectral.pyi | 4 +- .../networkx/networkx/algorithms/boundary.pyi | 4 +- .../networkx/networkx/algorithms/bridges.pyi | 6 +- .../networkx/algorithms/broadcasting.pyi | 9 + .../algorithms/centrality/betweenness.pyi | 6 +- .../centrality/betweenness_subset.pyi | 6 +- .../algorithms/centrality/closeness.pyi | 6 +- .../centrality/current_flow_betweenness.pyi | 8 +- .../current_flow_betweenness_subset.pyi | 6 +- .../centrality/current_flow_closeness.pyi | 4 +- .../algorithms/centrality/degree_alg.pyi | 8 +- .../algorithms/centrality/dispersion.pyi | 4 +- .../algorithms/centrality/eigenvector.pyi | 6 +- .../algorithms/centrality/flow_matrix.pyi | 4 +- .../networkx/algorithms/centrality/group.pyi | 14 +- .../algorithms/centrality/harmonic.pyi | 4 +- .../networkx/algorithms/centrality/katz.pyi | 6 +- .../algorithms/centrality/laplacian.pyi | 4 +- .../networkx/algorithms/centrality/load.pyi | 6 +- .../algorithms/centrality/percolation.pyi | 4 +- .../algorithms/centrality/reaching.pyi | 6 +- .../algorithms/centrality/second_order.pyi | 4 +- .../algorithms/centrality/subgraph_alg.pyi | 10 +- .../algorithms/centrality/trophic.pyi | 8 +- .../algorithms/centrality/voterank_alg.pyi | 4 +- .../networkx/networkx/algorithms/chains.pyi | 4 +- .../networkx/networkx/algorithms/chordal.pyi | 10 +- .../networkx/networkx/algorithms/clique.pyi | 12 +- .../networkx/networkx/algorithms/cluster.pyi | 14 +- .../coloring/equitable_coloring.pyi | 4 +- .../algorithms/coloring/greedy_coloring.pyi | 20 +- .../algorithms/communicability_alg.pyi | 6 +- .../algorithms/community/__init__.pyi | 1 + .../algorithms/community/asyn_fluid.pyi | 4 +- .../algorithms/community/centrality.pyi | 4 +- .../algorithms/community/community_utils.pyi | 4 +- .../algorithms/community/divisive.pyi | 10 + .../networkx/algorithms/community/kclique.pyi | 4 +- .../algorithms/community/kernighan_lin.pyi | 4 +- .../community/label_propagation.pyi | 6 +- .../networkx/algorithms/community/louvain.pyi | 6 +- .../networkx/algorithms/community/lukes.pyi | 4 +- .../algorithms/community/modularity_max.pyi | 6 +- .../networkx/algorithms/community/quality.pyi | 6 +- .../algorithms/components/attracting.pyi | 8 +- .../algorithms/components/biconnected.pyi | 10 +- .../algorithms/components/connected.pyi | 10 +- .../algorithms/components/semiconnected.pyi | 4 +- .../components/strongly_connected.pyi | 14 +- .../components/weakly_connected.pyi | 8 +- .../algorithms/connectivity/connectivity.pyi | 14 +- .../networkx/algorithms/connectivity/cuts.pyi | 10 +- .../connectivity/disjoint_paths.pyi | 6 +- .../connectivity/edge_augmentation.pyi | 8 +- .../connectivity/edge_kcomponents.pyi | 8 +- .../algorithms/connectivity/kcomponents.pyi | 4 +- .../algorithms/connectivity/kcutsets.pyi | 4 +- .../algorithms/connectivity/stoerwagner.pyi | 4 +- .../algorithms/connectivity/utils.pyi | 6 +- .../networkx/networkx/algorithms/core.pyi | 16 +- .../networkx/networkx/algorithms/covering.pyi | 6 +- .../networkx/networkx/algorithms/cuts.pyi | 18 +- .../networkx/networkx/algorithms/cycles.pyi | 14 +- .../networkx/algorithms/d_separation.pyi | 8 +- .../networkx/networkx/algorithms/dag.pyi | 32 +- .../networkx/algorithms/distance_measures.pyi | 16 +- .../networkx/algorithms/distance_regular.pyi | 10 +- .../networkx/algorithms/dominance.pyi | 6 +- .../networkx/algorithms/dominating.pyi | 6 +- .../algorithms/efficiency_measures.pyi | 8 +- .../networkx/networkx/algorithms/euler.pyi | 14 +- .../algorithms/flow/boykovkolmogorov.pyi | 4 +- .../algorithms/flow/capacityscaling.pyi | 4 +- .../networkx/algorithms/flow/dinitz_alg.pyi | 4 +- .../networkx/algorithms/flow/edmondskarp.pyi | 4 +- .../networkx/algorithms/flow/gomory_hu.pyi | 4 +- .../networkx/algorithms/flow/maxflow.pyi | 10 +- .../networkx/algorithms/flow/mincost.pyi | 10 +- .../algorithms/flow/networksimplex.pyi | 4 +- .../networkx/algorithms/flow/preflowpush.pyi | 4 +- .../flow/shortestaugmentingpath.pyi | 4 +- .../networkx/algorithms/flow/utils.pyi | 8 +- .../networkx/algorithms/graph_hashing.pyi | 6 +- .../networkx/algorithms/graphical.pyi | 14 +- .../networkx/algorithms/hierarchy.pyi | 4 +- .../networkx/networkx/algorithms/hybrid.pyi | 6 +- .../networkx/networkx/algorithms/isolate.pyi | 8 +- .../algorithms/isomorphism/isomorph.pyi | 10 +- .../algorithms/isomorphism/matchhelpers.pyi | 14 +- .../isomorphism/tree_isomorphism.pyi | 6 +- .../networkx/algorithms/isomorphism/vf2pp.pyi | 8 +- .../algorithms/link_analysis/hits_alg.pyi | 4 +- .../algorithms/link_analysis/pagerank_alg.pyi | 6 +- .../networkx/algorithms/link_prediction.pyi | 18 +- .../algorithms/lowest_common_ancestors.pyi | 8 +- .../networkx/networkx/algorithms/matching.pyi | 14 +- .../algorithms/minors/contraction.pyi | 10 +- .../networkx/networkx/algorithms/mis.pyi | 4 +- .../networkx/networkx/algorithms/moral.pyi | 4 +- .../algorithms/node_classification.pyi | 6 +- .../networkx/algorithms/non_randomness.pyi | 4 +- .../networkx/algorithms/operators/all.pyi | 10 +- .../networkx/algorithms/operators/binary.pyi | 14 +- .../networkx/algorithms/operators/product.pyi | 16 +- .../networkx/algorithms/operators/unary.pyi | 6 +- .../networkx/algorithms/planar_drawing.pyi | 4 +- .../networkx/algorithms/planarity.pyi | 6 +- .../networkx/algorithms/polynomials.pyi | 6 +- .../networkx/algorithms/reciprocity.pyi | 6 +- .../networkx/networkx/algorithms/regular.pyi | 8 +- .../networkx/networkx/algorithms/richclub.pyi | 4 +- .../algorithms/shortest_paths/astar.pyi | 6 +- .../algorithms/shortest_paths/dense.pyi | 10 +- .../algorithms/shortest_paths/generic.pyi | 10 +- .../algorithms/shortest_paths/unweighted.pyi | 18 +- .../algorithms/shortest_paths/weighted.pyi | 52 +- .../networkx/algorithms/similarity.pyi | 16 +- .../networkx/algorithms/simple_paths.pyi | 10 +- .../networkx/algorithms/smallworld.pyi | 10 +- .../networkx/networkx/algorithms/smetric.pyi | 4 +- .../networkx/algorithms/sparsifiers.pyi | 4 +- .../networkx/algorithms/structuralholes.pyi | 8 +- .../networkx/algorithms/summarization.pyi | 6 +- .../networkx/networkx/algorithms/swap.pyi | 8 +- .../networkx/algorithms/threshold.pyi | 6 +- .../networkx/algorithms/tournament.pyi | 14 +- .../algorithms/traversal/beamsearch.pyi | 4 +- .../traversal/breadth_first_search.pyi | 14 +- .../traversal/depth_first_search.pyi | 16 +- .../networkx/algorithms/traversal/edgebfs.pyi | 4 +- .../networkx/algorithms/traversal/edgedfs.pyi | 4 +- .../networkx/algorithms/tree/branchings.pyi | 14 +- .../networkx/algorithms/tree/coding.pyi | 10 +- .../algorithms/tree/decomposition.pyi | 4 +- .../networkx/networkx/algorithms/tree/mst.pyi | 14 +- .../networkx/algorithms/tree/operations.pyi | 4 +- .../networkx/algorithms/tree/recognition.pyi | 10 +- .../networkx/networkx/algorithms/triads.pyi | 16 +- .../networkx/networkx/algorithms/vitality.pyi | 4 +- .../networkx/networkx/algorithms/voronoi.pyi | 4 +- .../networkx/networkx/algorithms/wiener.pyi | 4 +- .../networkx/networkx/classes/function.pyi | 2 + .../stubs/networkx/networkx/convert.pyi | 12 +- .../networkx/networkx/convert_matrix.pyi | 8 +- .../networkx/networkx/drawing/nx_agraph.pyi | 6 +- .../networkx/networkx/drawing/nx_pydot.pyi | 6 +- .../networkx/networkx/drawing/nx_pylab.pyi | 7 + .../networkx/networkx/generators/atlas.pyi | 6 +- .../networkx/networkx/generators/classic.pyi | 40 +- .../networkx/networkx/generators/cographs.pyi | 4 +- .../networkx/generators/community.pyi | 22 +- .../networkx/generators/degree_seq.pyi | 16 +- .../networkx/networkx/generators/directed.pyi | 12 +- .../networkx/generators/duplication.pyi | 6 +- .../networkx/networkx/generators/ego.pyi | 4 +- .../networkx/generators/expanders.pyi | 8 +- .../networkx/generators/geometric.pyi | 16 +- .../networkx/generators/harary_graph.pyi | 6 +- .../generators/internet_as_graphs.pyi | 4 +- .../networkx/generators/intersection.pyi | 8 +- .../networkx/generators/interval_graph.pyi | 4 +- .../networkx/generators/joint_degree_seq.pyi | 10 +- .../networkx/networkx/generators/lattice.pyi | 12 +- .../networkx/networkx/generators/line.pyi | 6 +- .../networkx/generators/mycielski.pyi | 6 +- .../generators/nonisomorphic_trees.pyi | 6 +- .../networkx/generators/random_graphs.pyi | 36 +- .../networkx/networkx/generators/small.pyi | 48 +- .../networkx/networkx/generators/social.pyi | 10 +- .../generators/spectral_graph_forge.pyi | 4 +- .../networkx/generators/stochastic.pyi | 4 +- .../networkx/networkx/generators/sudoku.pyi | 4 +- .../networkx/networkx/generators/trees.pyi | 8 +- .../networkx/networkx/generators/triads.pyi | 4 +- .../networkx/linalg/algebraicconnectivity.pyi | 10 +- .../networkx/networkx/linalg/attrmatrix.pyi | 6 +- .../networkx/linalg/bethehessianmatrix.pyi | 4 +- .../networkx/networkx/linalg/graphmatrix.pyi | 6 +- .../networkx/linalg/laplacianmatrix.pyi | 12 +- .../networkx/linalg/modularitymatrix.pyi | 6 +- .../networkx/networkx/linalg/spectrum.pyi | 12 +- .../networkx/networkx/readwrite/adjlist.pyi | 6 +- .../networkx/networkx/readwrite/edgelist.pyi | 8 +- .../networkx/networkx/readwrite/gexf.pyi | 4 +- .../stubs/networkx/networkx/readwrite/gml.pyi | 6 +- .../networkx/networkx/readwrite/graph6.pyi | 6 +- .../networkx/networkx/readwrite/graphml.pyi | 8 +- .../readwrite/json_graph/adjacency.pyi | 6 +- .../readwrite/json_graph/cytoscape.pyi | 4 +- .../readwrite/json_graph/node_link.pyi | 4 +- .../networkx/readwrite/json_graph/tree.pyi | 4 +- .../networkx/networkx/readwrite/leda.pyi | 6 +- .../networkx/readwrite/multiline_adjlist.pyi | 6 +- .../stubs/networkx/networkx/readwrite/p2g.pyi | 6 +- .../networkx/networkx/readwrite/pajek.pyi | 6 +- .../networkx/networkx/readwrite/sparse6.pyi | 6 +- .../stubs/networkx/networkx/relabel.pyi | 4 +- .../networkx/networkx/utils/__init__.pyi | 21 +- .../networkx/networkx/utils/backends.pyi | 9 +- .../stubs/networkx/networkx/utils/configs.pyi | 32 + .../stubs/networkx/networkx/utils/misc.pyi | 22 + .../stubs/peewee/METADATA.toml | 2 +- .../typeshed-fallback/stubs/peewee/peewee.pyi | 128 ++-- .../stubs/playsound/METADATA.toml | 2 - .../stubs/playsound/playsound.pyi | 8 - .../stubs/psutil/psutil/__init__.pyi | 2 +- .../stubs/psycopg2/METADATA.toml | 2 +- .../stubs/psycopg2/psycopg2/errorcodes.pyi | 611 +++++++++--------- .../stubs/psycopg2/psycopg2/errors.pyi | 1 + .../stubs/pygit2/METADATA.toml | 1 + .../stubs/pywin32/METADATA.toml | 2 +- .../stubs/pywin32/_win32typing.pyi | 20 +- .../stubs/pywin32/afxres.pyi | 1 - .../stubs/pywin32/isapi/simple.pyi | 4 +- .../pywin32/isapi/threaded_extension.pyi | 2 - .../stubs/pywin32/win32/_wincerapi.pyi | 73 --- .../stubs/pywin32/win32/lib/afxres.pyi | 499 -------------- .../stubs/pywin32/win32/lib/pywintypes.pyi | 5 +- .../stubs/pywin32/win32/lib/regutil.pyi | 1 - .../pywin32/win32/lib/win32evtlogutil.pyi | 3 +- .../stubs/pywin32/win32/lib/win32timezone.pyi | 6 +- .../stubs/pywin32/win32/lib/win32verstamp.pyi | 21 + .../stubs/pywin32/win32/lib/winnt.pyi | 7 +- .../stubs/pywin32/win32/win32api.pyi | 10 +- .../stubs/pywin32/win32/win32cred.pyi | 6 + .../stubs/pywin32/win32/win32gui.pyi | 17 +- .../stubs/pywin32/win32/win32service.pyi | 2 +- .../stubs/pywin32/win32/winxpgui.pyi | 9 +- .../win32com/axscript/client/debug.pyi | 1 + .../win32com/axscript/client/framework.pyi | 1 + .../win32com/axscript/server/error.pyi | 1 - .../pywin32/win32com/client/__init__.pyi | 6 +- .../stubs/pywin32/win32com/client/dynamic.pyi | 19 +- .../stubs/pywin32/win32com/mapi/_exchdapi.pyi | 1 - .../stubs/pywin32/win32com/server/connect.pyi | 3 - .../pywin32/win32com/server/dispatcher.pyi | 20 +- .../pywin32/win32com/server/exception.pyi | 2 - .../stubs/pywin32/win32com/server/policy.pyi | 10 - .../stubs/pywin32/win32com/server/util.pyi | 2 - .../stubs/pywin32/win32com/universal.pyi | 5 +- .../pywin32/win32comext/adsi/__init__.pyi | 4 + .../stubs/pywin32/win32comext/axdebug/adb.pyi | 5 +- .../win32comext/axdebug/codecontainer.pyi | 5 +- .../pywin32/win32comext/axdebug/contexts.pyi | 3 +- .../pywin32/win32comext/axdebug/debugger.pyi | 4 +- .../pywin32/win32comext/axdebug/documents.pyi | 8 +- .../win32comext/axdebug/expressions.pyi | 2 - .../win32comext/axdebug/stackframe.pyi | 2 - .../pywin32/win32comext/axdebug/util.pyi | 7 +- .../win32comext/axscript/client/debug.pyi | 42 ++ .../win32comext/axscript/client/error.pyi | 32 +- .../win32comext/axscript/client/framework.pyi | 154 +++++ .../win32comext/axscript/client/pyscript.pyi | 3 - .../win32comext/axscript/server/error.pyi | 6 - .../pywin32/win32comext/mapi/_exchdapi.pyi | 43 -- .../stubs/pywin32/win32comext/mapi/mapi.pyi | 9 + .../pywin32/win32comext/mapi/mapiutil.pyi | 13 +- .../stubs/pywin32/win32comext/shell/shell.pyi | 1 + .../pywin32/win32comext/shell/shellcon.pyi | 14 + .../stubs/pywin32/win32verstamp.pyi | 1 + .../stubs/requests/requests/cookies.pyi | 2 +- .../stubs/setuptools/METADATA.toml | 2 +- .../stubs/setuptools/setuptools/__init__.pyi | 17 +- .../setuptools/_distutils/ccompiler.pyi | 124 ++-- .../setuptools/setuptools/_distutils/cmd.pyi | 8 +- .../_distutils/command/build_py.pyi | 2 +- .../setuptools/setuptools/_distutils/dist.pyi | 2 +- .../setuptools/_distutils/filelist.pyi | 10 +- .../setuptools/_distutils/sysconfig.pyi | 4 +- .../setuptools/setuptools/_distutils/util.pyi | 12 +- .../stubs/xmltodict/METADATA.toml | 2 +- 459 files changed, 3515 insertions(+), 5145 deletions(-) create mode 100644 packages/pyright-internal/typeshed-fallback/stdlib/_asyncio.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stdlib/_io.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/METADATA.toml delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/__init__.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth_handler.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/compat.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/connection.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/ec2/__init__.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/elb/__init__.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/exception.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/__init__.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/exceptions.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/layer1.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/plugin.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/regioninfo.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/__init__.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/acl.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucket.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlistresultset.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlogging.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/connection.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/cors.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/deletemarker.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/key.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/keyfile.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/lifecycle.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multidelete.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multipart.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/prefix.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/tagging.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/user.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/website.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/boto/boto/utils.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/unicode_script.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/__init__.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/breakpoint.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/bt.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/disassemble.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/evaluate.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/events.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/frames.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/io.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/launch.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/locations.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/memory.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/modules.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/next.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/pause.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/scopes.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/server.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/sources.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/startup.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/state.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/threads.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/typecheck.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/varref.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/disassembler.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/missing_debug.pyi rename packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/{monkey.pyi => monkey/__init__.pyi} (86%) create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/api.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/broadcasting.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/divisive.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/playsound/METADATA.toml delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/playsound/playsound.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/afxres.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/_wincerapi.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/afxres.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32verstamp.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/debug.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/framework.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/server/error.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/mapi/_exchdapi.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/debug.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/framework.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/pyscript.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/server/error.pyi delete mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/_exchdapi.pyi create mode 100644 packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32verstamp.pyi diff --git a/packages/pyright-internal/src/tests/samples/subscript1.py b/packages/pyright-internal/src/tests/samples/subscript1.py index 8c031c4da66c..fdedad9791a4 100644 --- a/packages/pyright-internal/src/tests/samples/subscript1.py +++ b/packages/pyright-internal/src/tests/samples/subscript1.py @@ -11,12 +11,14 @@ def func1( a1: Queue[int], b1: OrderedDict[str, str], - c1: Future[int], d1: list[int], e1: dict[str, int], f1: set[int], g1: deque[int], h1: frozenset[int], + # These previously generated errors, but no longer do because of + # changes in the typeshed stubs. + c1: Future[int], i1: Task[None], ) -> None: pass @@ -41,12 +43,15 @@ def func2( class A: a1: Queue[int] = Queue() b1: OrderedDict[str, str] = OrderedDict() - c1: Future[int] = Future() d1: list[int] = [] e1: dict[str, int] = {} f1: set[int] = set() g1: deque[int] = deque() h1: frozenset[int] = frozenset() + + # These previously generated errors, but no longer do because of + # changes in the typeshed stubs. + c1: Future[int] = Future() i1: Task[None] diff --git a/packages/pyright-internal/src/tests/typeEvaluator6.test.ts b/packages/pyright-internal/src/tests/typeEvaluator6.test.ts index 6fb3c7b4f888..cd8f2e1cb8b1 100644 --- a/packages/pyright-internal/src/tests/typeEvaluator6.test.ts +++ b/packages/pyright-internal/src/tests/typeEvaluator6.test.ts @@ -912,7 +912,7 @@ test('Subscript1', () => { // Analyze with Python 3.8 settings. configOptions.defaultPythonVersion = pythonVersion3_8; const analysisResults38 = TestUtils.typeAnalyzeSampleFiles(['subscript1.py'], configOptions); - TestUtils.validateResults(analysisResults38, 18); + TestUtils.validateResults(analysisResults38, 14); // Analyze with Python 3.8 settings. configOptions.defaultPythonVersion = pythonVersion3_10; diff --git a/packages/pyright-internal/typeshed-fallback/README.md b/packages/pyright-internal/typeshed-fallback/README.md index 9f35705d6c02..9776813d07ea 100644 --- a/packages/pyright-internal/typeshed-fallback/README.md +++ b/packages/pyright-internal/typeshed-fallback/README.md @@ -21,7 +21,7 @@ the project the stubs are for, but instead report them here to typeshed.** Further documentation on stub files, typeshed, and Python's typing system in general, can also be found at https://typing.readthedocs.io/en/latest/. -Typeshed supports Python versions 3.8 and up. +Typeshed supports Python versions 3.8 to 3.13. ## Using diff --git a/packages/pyright-internal/typeshed-fallback/commit.txt b/packages/pyright-internal/typeshed-fallback/commit.txt index ec8efd7107ec..e6100d2ab389 100644 --- a/packages/pyright-internal/typeshed-fallback/commit.txt +++ b/packages/pyright-internal/typeshed-fallback/commit.txt @@ -1 +1 @@ -dbd0d3521745288a3b2e345d8683bb9539d28d60 +b0d57cc03c83e6e75a7b9cf13fb89b06c5fa039f diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/VERSIONS b/packages/pyright-internal/typeshed-fallback/stdlib/VERSIONS index 2b2a66d57f2a..ed23ee6ddcea 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/VERSIONS +++ b/packages/pyright-internal/typeshed-fallback/stdlib/VERSIONS @@ -20,6 +20,7 @@ __future__: 3.0- __main__: 3.0- _ast: 3.0- +_asyncio: 3.0- _bisect: 3.0- _bootlocale: 3.4-3.9 _codecs: 3.0- @@ -37,6 +38,7 @@ _imp: 3.0- _interpchannels: 3.13- _interpqueues: 3.13- _interpreters: 3.13- +_io: 3.0- _json: 3.0- _locale: 3.0- _lsprof: 3.0- diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/_asyncio.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/_asyncio.pyi new file mode 100644 index 000000000000..a259026615aa --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stdlib/_asyncio.pyi @@ -0,0 +1,120 @@ +import sys +from asyncio.events import AbstractEventLoop +from collections.abc import Awaitable, Callable, Coroutine, Generator +from contextvars import Context +from types import FrameType +from typing import Any, Literal, TextIO, TypeVar +from typing_extensions import Self, TypeAlias + +if sys.version_info >= (3, 9): + from types import GenericAlias + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_TaskYieldType: TypeAlias = Future[object] | None + +class Future(Awaitable[_T]): + _state: str + @property + def _exception(self) -> BaseException | None: ... + _blocking: bool + @property + def _log_traceback(self) -> bool: ... + @_log_traceback.setter + def _log_traceback(self, val: Literal[False]) -> None: ... + _asyncio_future_blocking: bool # is a part of duck-typing contract for `Future` + def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ... + def __del__(self) -> None: ... + def get_loop(self) -> AbstractEventLoop: ... + @property + def _callbacks(self) -> list[tuple[Callable[[Self], Any], Context]]: ... + def add_done_callback(self, fn: Callable[[Self], object], /, *, context: Context | None = None) -> None: ... + if sys.version_info >= (3, 9): + def cancel(self, msg: Any | None = None) -> bool: ... + else: + def cancel(self) -> bool: ... + + def cancelled(self) -> bool: ... + def done(self) -> bool: ... + def result(self) -> _T: ... + def exception(self) -> BaseException | None: ... + def remove_done_callback(self, fn: Callable[[Self], object], /) -> int: ... + def set_result(self, result: _T, /) -> None: ... + def set_exception(self, exception: type | BaseException, /) -> None: ... + def __iter__(self) -> Generator[Any, None, _T]: ... + def __await__(self) -> Generator[Any, None, _T]: ... + @property + def _loop(self) -> AbstractEventLoop: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... + +if sys.version_info >= (3, 12): + _TaskCompatibleCoro: TypeAlias = Coroutine[Any, Any, _T_co] +elif sys.version_info >= (3, 9): + _TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Coroutine[Any, Any, _T_co] +else: + _TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Awaitable[_T_co] + +# mypy and pyright complain that a subclass of an invariant class shouldn't be covariant. +# While this is true in general, here it's sort-of okay to have a covariant subclass, +# since the only reason why `asyncio.Future` is invariant is the `set_result()` method, +# and `asyncio.Task.set_result()` always raises. +class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments] + if sys.version_info >= (3, 12): + def __init__( + self, + coro: _TaskCompatibleCoro[_T_co], + *, + loop: AbstractEventLoop = ..., + name: str | None = ..., + context: Context | None = None, + eager_start: bool = False, + ) -> None: ... + elif sys.version_info >= (3, 11): + def __init__( + self, + coro: _TaskCompatibleCoro[_T_co], + *, + loop: AbstractEventLoop = ..., + name: str | None = ..., + context: Context | None = None, + ) -> None: ... + else: + def __init__( + self, coro: _TaskCompatibleCoro[_T_co], *, loop: AbstractEventLoop = ..., name: str | None = ... + ) -> None: ... + + if sys.version_info >= (3, 12): + def get_coro(self) -> _TaskCompatibleCoro[_T_co] | None: ... + else: + def get_coro(self) -> _TaskCompatibleCoro[_T_co]: ... + + def get_name(self) -> str: ... + def set_name(self, value: object, /) -> None: ... + if sys.version_info >= (3, 12): + def get_context(self) -> Context: ... + + def get_stack(self, *, limit: int | None = None) -> list[FrameType]: ... + def print_stack(self, *, limit: int | None = None, file: TextIO | None = None) -> None: ... + if sys.version_info >= (3, 11): + def cancelling(self) -> int: ... + def uncancel(self) -> int: ... + if sys.version_info < (3, 9): + @classmethod + def current_task(cls, loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... + @classmethod + def all_tasks(cls, loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... + +def get_event_loop() -> AbstractEventLoop: ... +def get_running_loop() -> AbstractEventLoop: ... +def _set_running_loop(loop: AbstractEventLoop | None, /) -> None: ... +def _get_running_loop() -> AbstractEventLoop: ... +def _register_task(task: Task[Any]) -> None: ... +def _unregister_task(task: Task[Any]) -> None: ... +def _enter_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ... +def _leave_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ... + +if sys.version_info >= (3, 12): + def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/_csv.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/_csv.pyi index 6d1893cf8c16..0e206a63b260 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/_csv.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/_csv.pyi @@ -1,3 +1,4 @@ +import csv import sys from _typeshed import SupportsWrite from collections.abc import Iterable, Iterator @@ -20,7 +21,7 @@ _QuotingType: TypeAlias = int class Error(Exception): ... -_DialectLike: TypeAlias = str | Dialect | type[Dialect] +_DialectLike: TypeAlias = str | Dialect | csv.Dialect | type[Dialect | csv.Dialect] class Dialect: delimiter: str diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/_ctypes.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/_ctypes.pyi index 5313195a0ba8..f4d26d05323a 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/_ctypes.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/_ctypes.pyi @@ -2,7 +2,7 @@ import sys from _typeshed import ReadableBuffer, WriteableBuffer from abc import abstractmethod from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence -from ctypes import CDLL, ArgumentError as ArgumentError +from ctypes import CDLL, ArgumentError as ArgumentError, c_void_p from typing import Any, ClassVar, Generic, TypeVar, overload from typing_extensions import Self, TypeAlias @@ -99,6 +99,9 @@ class _Pointer(_PointerLike, _CData, Generic[_CT]): def __getitem__(self, key: slice, /) -> list[Any]: ... def __setitem__(self, key: int, value: Any, /) -> None: ... +@overload +def POINTER(type: None, /) -> type[c_void_p]: ... +@overload def POINTER(type: type[_CT], /) -> type[_Pointer[_CT]]: ... def pointer(obj: _CT, /) -> _Pointer[_CT]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/_io.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/_io.pyi new file mode 100644 index 000000000000..e8290daad106 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stdlib/_io.pyi @@ -0,0 +1,195 @@ +import builtins +import codecs +import sys +from _typeshed import FileDescriptorOrPath, MaybeNone, ReadableBuffer, WriteableBuffer +from collections.abc import Callable, Iterable, Iterator +from io import BufferedIOBase, RawIOBase, TextIOBase, UnsupportedOperation as UnsupportedOperation +from os import _Opener +from types import TracebackType +from typing import IO, Any, BinaryIO, Final, Generic, Literal, Protocol, TextIO, TypeVar, overload, type_check_only +from typing_extensions import Self + +_T = TypeVar("_T") + +DEFAULT_BUFFER_SIZE: Final = 8192 + +open = builtins.open + +def open_code(path: str) -> IO[bytes]: ... + +BlockingIOError = builtins.BlockingIOError + +class _IOBase: + def __iter__(self) -> Iterator[bytes]: ... + def __next__(self) -> bytes: ... + def __enter__(self) -> Self: ... + def __exit__( + self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None + ) -> None: ... + def close(self) -> None: ... + def fileno(self) -> int: ... + def flush(self) -> None: ... + def isatty(self) -> bool: ... + def readable(self) -> bool: ... + read: Callable[..., Any] + def readlines(self, hint: int = -1, /) -> list[bytes]: ... + def seek(self, offset: int, whence: int = ..., /) -> int: ... + def seekable(self) -> bool: ... + def tell(self) -> int: ... + def truncate(self, size: int | None = ..., /) -> int: ... + def writable(self) -> bool: ... + write: Callable[..., Any] + def writelines(self, lines: Iterable[ReadableBuffer], /) -> None: ... + def readline(self, size: int | None = -1, /) -> bytes: ... + def __del__(self) -> None: ... + @property + def closed(self) -> bool: ... + def _checkClosed(self) -> None: ... # undocumented + +class _RawIOBase(_IOBase): + def readall(self) -> bytes: ... + # The following methods can return None if the file is in non-blocking mode + # and no data is available. + def readinto(self, buffer: WriteableBuffer, /) -> int | MaybeNone: ... + def write(self, b: ReadableBuffer, /) -> int | MaybeNone: ... + def read(self, size: int = -1, /) -> bytes | MaybeNone: ... + +class _BufferedIOBase(_IOBase): + def detach(self) -> RawIOBase: ... + def readinto(self, buffer: WriteableBuffer, /) -> int: ... + def write(self, buffer: ReadableBuffer, /) -> int: ... + def readinto1(self, buffer: WriteableBuffer, /) -> int: ... + def read(self, size: int | None = ..., /) -> bytes: ... + def read1(self, size: int = ..., /) -> bytes: ... + +class FileIO(RawIOBase, _RawIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of writelines in the base classes + mode: str + # The type of "name" equals the argument passed in to the constructor, + # but that can make FileIO incompatible with other I/O types that assume + # "name" is a str. In the future, making FileIO generic might help. + name: Any + def __init__( + self, file: FileDescriptorOrPath, mode: str = ..., closefd: bool = ..., opener: _Opener | None = ... + ) -> None: ... + @property + def closefd(self) -> bool: ... + +class BytesIO(BufferedIOBase, _BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of methods in the base classes + def __init__(self, initial_bytes: ReadableBuffer = ...) -> None: ... + # BytesIO does not contain a "name" field. This workaround is necessary + # to allow BytesIO sub-classes to add this field, as it is defined + # as a read-only property on IO[]. + name: Any + def getvalue(self) -> bytes: ... + def getbuffer(self) -> memoryview: ... + def read1(self, size: int | None = -1, /) -> bytes: ... + +class BufferedReader(BufferedIOBase, _BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of methods in the base classes + raw: RawIOBase + def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... + def peek(self, size: int = 0, /) -> bytes: ... + +class BufferedWriter(BufferedIOBase, _BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of writelines in the base classes + raw: RawIOBase + def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... + def write(self, buffer: ReadableBuffer, /) -> int: ... + +class BufferedRandom(BufferedReader, BufferedWriter, BufferedIOBase, _BufferedIOBase): # type: ignore[misc] # incompatible definitions of methods in the base classes + def seek(self, target: int, whence: int = 0, /) -> int: ... # stubtest needs this + +class BufferedRWPair(BufferedIOBase, _BufferedIOBase): + def __init__(self, reader: RawIOBase, writer: RawIOBase, buffer_size: int = ...) -> None: ... + def peek(self, size: int = ..., /) -> bytes: ... + +class _TextIOBase(_IOBase): + encoding: str + errors: str | None + newlines: str | tuple[str, ...] | None + def __iter__(self) -> Iterator[str]: ... # type: ignore[override] + def __next__(self) -> str: ... # type: ignore[override] + def detach(self) -> BinaryIO: ... + def write(self, s: str, /) -> int: ... + def writelines(self, lines: Iterable[str], /) -> None: ... # type: ignore[override] + def readline(self, size: int = ..., /) -> str: ... # type: ignore[override] + def readlines(self, hint: int = -1, /) -> list[str]: ... # type: ignore[override] + def read(self, size: int | None = ..., /) -> str: ... + +@type_check_only +class _WrappedBuffer(Protocol): + # "name" is wrapped by TextIOWrapper. Its type is inconsistent between + # the various I/O types, see the comments on TextIOWrapper.name and + # TextIO.name. + @property + def name(self) -> Any: ... + @property + def closed(self) -> bool: ... + def read(self, size: int = ..., /) -> ReadableBuffer: ... + # Optional: def read1(self, size: int, /) -> ReadableBuffer: ... + def write(self, b: bytes, /) -> object: ... + def flush(self) -> object: ... + def close(self) -> object: ... + def seekable(self) -> bool: ... + def readable(self) -> bool: ... + def writable(self) -> bool: ... + def truncate(self, size: int, /) -> int: ... + def fileno(self) -> int: ... + def isatty(self) -> bool: ... + # Optional: Only needs to be present if seekable() returns True. + # def seek(self, offset: Literal[0], whence: Literal[2]) -> int: ... + # def tell(self) -> int: ... + +_BufferT_co = TypeVar("_BufferT_co", bound=_WrappedBuffer, default=_WrappedBuffer, covariant=True) + +class TextIOWrapper(TextIOBase, _TextIOBase, TextIO, Generic[_BufferT_co]): # type: ignore[misc] # incompatible definitions of write in the base classes + def __init__( + self, + buffer: _BufferT_co, + encoding: str | None = None, + errors: str | None = None, + newline: str | None = None, + line_buffering: bool = False, + write_through: bool = False, + ) -> None: ... + # Equals the "buffer" argument passed in to the constructor. + @property + def buffer(self) -> _BufferT_co: ... # type: ignore[override] + @property + def line_buffering(self) -> bool: ... + @property + def write_through(self) -> bool: ... + def reconfigure( + self, + *, + encoding: str | None = None, + errors: str | None = None, + newline: str | None = None, + line_buffering: bool | None = None, + write_through: bool | None = None, + ) -> None: ... + def readline(self, size: int = -1, /) -> str: ... # type: ignore[override] + # Equals the "buffer" argument passed in to the constructor. + def detach(self) -> _BufferT_co: ... # type: ignore[override] + # TextIOWrapper's version of seek only supports a limited subset of + # operations. + def seek(self, cookie: int, whence: int = 0, /) -> int: ... + +class StringIO(TextIOWrapper, TextIOBase, _TextIOBase): # type: ignore[misc] # incompatible definitions of write in the base classes + def __init__(self, initial_value: str | None = ..., newline: str | None = ...) -> None: ... + # StringIO does not contain a "name" field. This workaround is necessary + # to allow StringIO sub-classes to add this field, as it is defined + # as a read-only property on IO[]. + name: Any + def getvalue(self) -> str: ... + +class IncrementalNewlineDecoder(codecs.IncrementalDecoder): + def __init__(self, decoder: codecs.IncrementalDecoder | None, translate: bool, errors: str = ...) -> None: ... + def decode(self, input: ReadableBuffer | str, final: bool = False) -> str: ... + @property + def newlines(self) -> str | tuple[str, ...] | None: ... + def setstate(self, state: tuple[bytes, int], /) -> None: ... + +if sys.version_info >= (3, 10): + @overload + def text_encoding(encoding: None, stacklevel: int = 2, /) -> Literal["locale", "utf-8"]: ... + @overload + def text_encoding(encoding: _T, stacklevel: int = 2, /) -> _T: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/_operator.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/_operator.pyi index 1b0083f4e274..967215d8fa21 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/_operator.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/_operator.pyi @@ -1,18 +1,16 @@ import sys from _typeshed import SupportsGetItem from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence -from typing import Any, AnyStr, Generic, Protocol, SupportsAbs, SupportsIndex, TypeVar, final, overload -from typing_extensions import ParamSpec, TypeAlias, TypeIs, TypeVarTuple, Unpack +from operator import attrgetter as attrgetter, itemgetter as itemgetter, methodcaller as methodcaller +from typing import Any, AnyStr, Protocol, SupportsAbs, SupportsIndex, TypeVar, overload +from typing_extensions import ParamSpec, TypeAlias, TypeIs _R = TypeVar("_R") _T = TypeVar("_T") _T_co = TypeVar("_T_co", covariant=True) -_T1 = TypeVar("_T1") -_T2 = TypeVar("_T2") _K = TypeVar("_K") _V = TypeVar("_V") _P = ParamSpec("_P") -_Ts = TypeVarTuple("_Ts") # The following protocols return "Any" instead of bool, since the comparison # operators can be overloaded to return an arbitrary object. For example, @@ -92,40 +90,6 @@ def setitem(a: MutableSequence[_T], b: slice, c: Sequence[_T], /) -> None: ... @overload def setitem(a: MutableMapping[_K, _V], b: _K, c: _V, /) -> None: ... def length_hint(obj: object, default: int = 0, /) -> int: ... -@final -class attrgetter(Generic[_T_co]): - @overload - def __new__(cls, attr: str, /) -> attrgetter[Any]: ... - @overload - def __new__(cls, attr: str, attr2: str, /) -> attrgetter[tuple[Any, Any]]: ... - @overload - def __new__(cls, attr: str, attr2: str, attr3: str, /) -> attrgetter[tuple[Any, Any, Any]]: ... - @overload - def __new__(cls, attr: str, attr2: str, attr3: str, attr4: str, /) -> attrgetter[tuple[Any, Any, Any, Any]]: ... - @overload - def __new__(cls, attr: str, /, *attrs: str) -> attrgetter[tuple[Any, ...]]: ... - def __call__(self, obj: Any, /) -> _T_co: ... - -@final -class itemgetter(Generic[_T_co]): - @overload - def __new__(cls, item: _T, /) -> itemgetter[_T]: ... - @overload - def __new__(cls, item1: _T1, item2: _T2, /, *items: Unpack[_Ts]) -> itemgetter[tuple[_T1, _T2, Unpack[_Ts]]]: ... - # __key: _KT_contra in SupportsGetItem seems to be causing variance issues, ie: - # TypeVar "_KT_contra@SupportsGetItem" is contravariant - # "tuple[int, int]" is incompatible with protocol "SupportsIndex" - # preventing [_T_co, ...] instead of [Any, ...] - # - # A suspected mypy issue prevents using [..., _T] instead of [..., Any] here. - # https://github.com/python/mypy/issues/14032 - def __call__(self, obj: SupportsGetItem[Any, Any]) -> Any: ... - -@final -class methodcaller: - def __init__(self, name: str, /, *args: Any, **kwargs: Any) -> None: ... - def __call__(self, obj: Any) -> Any: ... - def iadd(a: Any, b: Any, /) -> Any: ... def iand(a: Any, b: Any, /) -> Any: ... def iconcat(a: Any, b: Any, /) -> Any: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/events.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/events.pyi index eed688fc792a..ead64070671f 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/events.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/events.pyi @@ -1,5 +1,11 @@ import ssl import sys +from _asyncio import ( + _get_running_loop as _get_running_loop, + _set_running_loop as _set_running_loop, + get_event_loop as get_event_loop, + get_running_loop as get_running_loop, +) from _typeshed import FileDescriptorLike, ReadableBuffer, StrPath, Unused, WriteableBuffer from abc import ABCMeta, abstractmethod from collections.abc import Callable, Sequence @@ -632,7 +638,6 @@ class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy, metaclass=ABCMeta): def get_event_loop_policy() -> AbstractEventLoopPolicy: ... def set_event_loop_policy(policy: AbstractEventLoopPolicy | None) -> None: ... -def get_event_loop() -> AbstractEventLoop: ... def set_event_loop(loop: AbstractEventLoop | None) -> None: ... def new_event_loop() -> AbstractEventLoop: ... @@ -646,7 +651,3 @@ if sys.version_info < (3, 14): else: def get_child_watcher() -> AbstractChildWatcher: ... def set_child_watcher(watcher: AbstractChildWatcher) -> None: ... - -def _set_running_loop(loop: AbstractEventLoop | None, /) -> None: ... -def _get_running_loop() -> AbstractEventLoop: ... -def get_running_loop() -> AbstractEventLoop: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/futures.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/futures.pyi index e19fd53f3311..28e6ca8c86a3 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/futures.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/futures.pyi @@ -1,15 +1,10 @@ -import sys -from collections.abc import Awaitable, Callable, Generator, Iterable +from _asyncio import Future as Future from concurrent.futures._base import Future as _ConcurrentFuture -from contextvars import Context -from typing import Any, Literal, TypeVar -from typing_extensions import Self, TypeIs +from typing import Any, TypeVar +from typing_extensions import TypeIs from .events import AbstractEventLoop -if sys.version_info >= (3, 9): - from types import GenericAlias - __all__ = ("Future", "wrap_future", "isfuture") _T = TypeVar("_T") @@ -18,40 +13,4 @@ _T = TypeVar("_T") # but it leads to circular import error in pytype tool. # That's why the import order is reversed. def isfuture(obj: object) -> TypeIs[Future[Any]]: ... - -class Future(Awaitable[_T], Iterable[_T]): - _state: str - @property - def _exception(self) -> BaseException | None: ... - _blocking: bool - @property - def _log_traceback(self) -> bool: ... - @_log_traceback.setter - def _log_traceback(self, val: Literal[False]) -> None: ... - _asyncio_future_blocking: bool # is a part of duck-typing contract for `Future` - def __init__(self, *, loop: AbstractEventLoop | None = ...) -> None: ... - def __del__(self) -> None: ... - def get_loop(self) -> AbstractEventLoop: ... - @property - def _callbacks(self) -> list[tuple[Callable[[Self], Any], Context]]: ... - def add_done_callback(self, fn: Callable[[Self], object], /, *, context: Context | None = None) -> None: ... - if sys.version_info >= (3, 9): - def cancel(self, msg: Any | None = None) -> bool: ... - else: - def cancel(self) -> bool: ... - - def cancelled(self) -> bool: ... - def done(self) -> bool: ... - def result(self) -> _T: ... - def exception(self) -> BaseException | None: ... - def remove_done_callback(self, fn: Callable[[Self], object], /) -> int: ... - def set_result(self, result: _T, /) -> None: ... - def set_exception(self, exception: type | BaseException, /) -> None: ... - def __iter__(self) -> Generator[Any, None, _T]: ... - def __await__(self) -> Generator[Any, None, _T]: ... - @property - def _loop(self) -> AbstractEventLoop: ... - if sys.version_info >= (3, 9): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - def wrap_future(future: _ConcurrentFuture[_T] | Future[_T], *, loop: AbstractEventLoop | None = None) -> Future[_T]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/streams.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/streams.pyi index 0be5249e2169..ed95583c1847 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/streams.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/streams.pyi @@ -1,7 +1,7 @@ import ssl import sys from _typeshed import ReadableBuffer, StrPath -from collections.abc import AsyncIterator, Awaitable, Callable, Iterable, Sequence, Sized +from collections.abc import Awaitable, Callable, Iterable, Sequence, Sized from types import ModuleType from typing import Any, Protocol, SupportsIndex from typing_extensions import Self, TypeAlias @@ -137,7 +137,7 @@ class StreamWriter: elif sys.version_info >= (3, 11): def __del__(self) -> None: ... -class StreamReader(AsyncIterator[bytes]): +class StreamReader: def __init__(self, limit: int = 65536, loop: events.AbstractEventLoop | None = None) -> None: ... def exception(self) -> Exception: ... def set_exception(self, exc: Exception) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/tasks.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/tasks.pyi index bb423e857399..47d1bb13e4a3 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/tasks.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/asyncio/tasks.pyi @@ -1,16 +1,20 @@ import concurrent.futures import sys +from _asyncio import ( + Task as Task, + _enter_task as _enter_task, + _leave_task as _leave_task, + _register_task as _register_task, + _unregister_task as _unregister_task, +) from collections.abc import Awaitable, Coroutine, Generator, Iterable, Iterator -from types import FrameType -from typing import Any, Literal, Protocol, TextIO, TypeVar, overload +from typing import Any, Literal, Protocol, TypeVar, overload from typing_extensions import TypeAlias from . import _CoroutineLike from .events import AbstractEventLoop from .futures import Future -if sys.version_info >= (3, 9): - from types import GenericAlias if sys.version_info >= (3, 11): from contextvars import Context @@ -400,58 +404,6 @@ elif sys.version_info >= (3, 9): else: _TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Awaitable[_T_co] -# mypy and pyright complain that a subclass of an invariant class shouldn't be covariant. -# While this is true in general, here it's sort-of okay to have a covariant subclass, -# since the only reason why `asyncio.Future` is invariant is the `set_result()` method, -# and `asyncio.Task.set_result()` always raises. -class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments] - if sys.version_info >= (3, 12): - def __init__( - self, - coro: _TaskCompatibleCoro[_T_co], - *, - loop: AbstractEventLoop = ..., - name: str | None = ..., - context: Context | None = None, - eager_start: bool = False, - ) -> None: ... - elif sys.version_info >= (3, 11): - def __init__( - self, - coro: _TaskCompatibleCoro[_T_co], - *, - loop: AbstractEventLoop = ..., - name: str | None = ..., - context: Context | None = None, - ) -> None: ... - else: - def __init__( - self, coro: _TaskCompatibleCoro[_T_co], *, loop: AbstractEventLoop = ..., name: str | None = ... - ) -> None: ... - - if sys.version_info >= (3, 12): - def get_coro(self) -> _TaskCompatibleCoro[_T_co] | None: ... - else: - def get_coro(self) -> _TaskCompatibleCoro[_T_co]: ... - - def get_name(self) -> str: ... - def set_name(self, value: object, /) -> None: ... - if sys.version_info >= (3, 12): - def get_context(self) -> Context: ... - - def get_stack(self, *, limit: int | None = None) -> list[FrameType]: ... - def print_stack(self, *, limit: int | None = None, file: TextIO | None = None) -> None: ... - if sys.version_info >= (3, 11): - def cancelling(self) -> int: ... - def uncancel(self) -> int: ... - if sys.version_info < (3, 9): - @classmethod - def current_task(cls, loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... - @classmethod - def all_tasks(cls, loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... - if sys.version_info >= (3, 9): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - def all_tasks(loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... if sys.version_info >= (3, 11): @@ -460,9 +412,10 @@ if sys.version_info >= (3, 11): else: def create_task(coro: _CoroutineLike[_T], *, name: str | None = None) -> Task[_T]: ... -def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... -def _enter_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ... -def _leave_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ... +if sys.version_info >= (3, 12): + from _asyncio import current_task as current_task +else: + def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... if sys.version_info >= (3, 12): _TaskT_co = TypeVar("_TaskT_co", bound=Task[Any], covariant=True) @@ -499,6 +452,3 @@ if sys.version_info >= (3, 12): name: str | None = None, context: Context | None = None, ) -> Task[_T_co]: ... - -def _register_task(task: Task[Any]) -> None: ... -def _unregister_task(task: Task[Any]) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/builtins.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/builtins.pyi index 9530b5ca7578..fee4ccc5023c 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/builtins.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/builtins.pyi @@ -897,6 +897,11 @@ class memoryview(Sequence[_I]): def __buffer__(self, flags: int, /) -> memoryview: ... def __release_buffer__(self, buffer: memoryview, /) -> None: ... + # These are inherited from the Sequence ABC, but don't actually exist on memoryview. + # See https://github.com/python/cpython/issues/125420 + index: ClassVar[None] # type: ignore[assignment] + count: ClassVar[None] # type: ignore[assignment] + @final class bool(int): def __new__(cls, o: object = ..., /) -> Self: ... @@ -943,7 +948,10 @@ class slice: @overload def __new__(cls, start: Any, stop: Any, step: Any = ..., /) -> Self: ... def __eq__(self, value: object, /) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] + if sys.version_info >= (3, 12): + def __hash__(self) -> int: ... + else: + __hash__: ClassVar[None] # type: ignore[assignment] def indices(self, len: SupportsIndex, /) -> tuple[int, int, int]: ... class tuple(Sequence[_T_co]): @@ -1208,7 +1216,7 @@ class frozenset(AbstractSet[_T_co]): def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... class enumerate(Iterator[tuple[int, _T]]): - def __new__(cls, iterable: Iterable[_T], start: int = ...) -> Self: ... + def __new__(cls, iterable: Iterable[_T], start: int = 0) -> Self: ... def __iter__(self) -> Self: ... def __next__(self) -> tuple[int, _T]: ... if sys.version_info >= (3, 9): diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/bz2.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/bz2.pyi index a7837e1b9ff8..cd11baa1a0c1 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/bz2.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/bz2.pyi @@ -131,7 +131,7 @@ class BZ2File(BaseStream, IO[bytes]): @final class BZ2Compressor: - def __init__(self, compresslevel: int = ...) -> None: ... + def __init__(self, compresslevel: int = 9) -> None: ... def compress(self, data: ReadableBuffer, /) -> bytes: ... def flush(self) -> bytes: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/code.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/code.pyi index 02689238a9a5..54971f3ae93c 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/code.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/code.pyi @@ -12,7 +12,11 @@ class InteractiveInterpreter: def __init__(self, locals: Mapping[str, Any] | None = None) -> None: ... def runsource(self, source: str, filename: str = "", symbol: str = "single") -> bool: ... def runcode(self, code: CodeType) -> None: ... - def showsyntaxerror(self, filename: str | None = None) -> None: ... + if sys.version_info >= (3, 13): + def showsyntaxerror(self, filename: str | None = None, *, source: str = "") -> None: ... + else: + def showsyntaxerror(self, filename: str | None = None) -> None: ... + def showtraceback(self) -> None: ... def write(self, data: str) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/collections/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/collections/__init__.pyi index b2ed53e4427e..2d136318813c 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/collections/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/collections/__init__.pyi @@ -17,7 +17,6 @@ if sys.version_info >= (3, 10): Mapping, MutableMapping, MutableSequence, - Reversible, Sequence, ValuesView, ) @@ -331,13 +330,13 @@ class Counter(dict[_T, int], Generic[_T]): # The pure-Python implementations of the "views" classes # These are exposed at runtime in `collections/__init__.py` -class _OrderedDictKeysView(KeysView[_KT_co], Reversible[_KT_co]): +class _OrderedDictKeysView(KeysView[_KT_co]): def __reversed__(self) -> Iterator[_KT_co]: ... -class _OrderedDictItemsView(ItemsView[_KT_co, _VT_co], Reversible[tuple[_KT_co, _VT_co]]): +class _OrderedDictItemsView(ItemsView[_KT_co, _VT_co]): def __reversed__(self) -> Iterator[tuple[_KT_co, _VT_co]]: ... -class _OrderedDictValuesView(ValuesView[_VT_co], Reversible[_VT_co]): +class _OrderedDictValuesView(ValuesView[_VT_co]): def __reversed__(self) -> Iterator[_VT_co]: ... # The C implementations of the "views" classes @@ -345,18 +344,18 @@ class _OrderedDictValuesView(ValuesView[_VT_co], Reversible[_VT_co]): # but they are not exposed anywhere) # pyright doesn't have a specific error code for subclassing error! @final -class _odict_keys(dict_keys[_KT_co, _VT_co], Reversible[_KT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] +class _odict_keys(dict_keys[_KT_co, _VT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] def __reversed__(self) -> Iterator[_KT_co]: ... @final -class _odict_items(dict_items[_KT_co, _VT_co], Reversible[tuple[_KT_co, _VT_co]]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] +class _odict_items(dict_items[_KT_co, _VT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] def __reversed__(self) -> Iterator[tuple[_KT_co, _VT_co]]: ... @final -class _odict_values(dict_values[_KT_co, _VT_co], Reversible[_VT_co], Generic[_KT_co, _VT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] +class _odict_values(dict_values[_KT_co, _VT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] def __reversed__(self) -> Iterator[_VT_co]: ... -class OrderedDict(dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]): +class OrderedDict(dict[_KT, _VT]): def popitem(self, last: bool = True) -> tuple[_KT, _VT]: ... def move_to_end(self, key: _KT, last: bool = True) -> None: ... def copy(self) -> Self: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/csv.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/csv.pyi index a1656f217ec6..c5c7fea8fa25 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/csv.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/csv.pyi @@ -4,7 +4,6 @@ from _csv import ( QUOTE_MINIMAL as QUOTE_MINIMAL, QUOTE_NONE as QUOTE_NONE, QUOTE_NONNUMERIC as QUOTE_NONNUMERIC, - Dialect as _Dialect, Error as Error, __version__ as __version__, _DialectLike, @@ -24,7 +23,7 @@ if sys.version_info >= (3, 12): from _csv import QUOTE_NOTNULL as QUOTE_NOTNULL, QUOTE_STRINGS as QUOTE_STRINGS from _typeshed import SupportsWrite -from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence +from collections.abc import Collection, Iterable, Mapping, Sequence from typing import Any, Generic, Literal, TypeVar, overload from typing_extensions import Self @@ -59,14 +58,22 @@ if sys.version_info < (3, 13): _T = TypeVar("_T") -class Dialect(_Dialect): +class Dialect: + delimiter: str + quotechar: str | None + escapechar: str | None + doublequote: bool + skipinitialspace: bool + lineterminator: str + quoting: _QuotingType + strict: bool def __init__(self) -> None: ... class excel(Dialect): ... class excel_tab(excel): ... class unix_dialect(Dialect): ... -class DictReader(Iterator[dict[_T | Any, str | Any]], Generic[_T]): +class DictReader(Generic[_T]): fieldnames: Sequence[_T] | None restkey: _T | None restval: str | Any | None diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist.pyi index 43d77087f7d8..6f996207077e 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist.pyi @@ -1,6 +1,6 @@ -from _typeshed import Unused +from _typeshed import Incomplete, Unused from collections.abc import Callable -from typing import Any, ClassVar +from typing import ClassVar from ..cmd import Command @@ -15,13 +15,13 @@ class bdist(Command): default_format: ClassVar[dict[str, str]] format_commands: ClassVar[list[str]] format_command: ClassVar[dict[str, tuple[str, str]]] - bdist_base: Any - plat_name: Any - formats: Any - dist_dir: Any + bdist_base: Incomplete + plat_name: Incomplete + formats: Incomplete + dist_dir: Incomplete skip_build: int - group: Any - owner: Any + group: Incomplete + owner: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi index 19997882dd53..297a0c39ed43 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command @@ -7,15 +8,15 @@ class bdist_dumb(Command): user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] default_format: ClassVar[dict[str, str]] - bdist_dir: Any - plat_name: Any - format: Any + bdist_dir: Incomplete + plat_name: Incomplete + format: Incomplete keep_temp: int - dist_dir: Any - skip_build: Any + dist_dir: Incomplete + skip_build: Incomplete relative: int - owner: Any - group: Any + owner: Incomplete + group: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi index d0eac1a3be5b..baeee7d3eccb 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi @@ -1,42 +1,43 @@ import sys -from typing import Any, ClassVar, Literal +from _typeshed import Incomplete +from typing import ClassVar, Literal from ..cmd import Command if sys.platform == "win32": - from msilib import Dialog + from msilib import Control, Dialog class PyDialog(Dialog): def __init__(self, *args, **kw) -> None: ... def title(self, title) -> None: ... - def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1): ... - def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1): ... - def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1): ... - def xbutton(self, name, title, next, xpos): ... + def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1) -> Control: ... + def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1) -> Control: ... + def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1) -> Control: ... + def xbutton(self, name, title, next, xpos) -> Control: ... class bdist_msi(Command): description: str user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] - all_versions: Any + all_versions: Incomplete other_version: str if sys.version_info >= (3, 9): def __init__(self, *args, **kw) -> None: ... - bdist_dir: Any - plat_name: Any + bdist_dir: Incomplete + plat_name: Incomplete keep_temp: int no_target_compile: int no_target_optimize: int - target_version: Any - dist_dir: Any - skip_build: Any - install_script: Any - pre_install_script: Any - versions: Any + target_version: Incomplete + dist_dir: Incomplete + skip_build: Incomplete + install_script: Incomplete + pre_install_script: Incomplete + versions: Incomplete def initialize_options(self) -> None: ... - install_script_key: Any + install_script_key: Incomplete def finalize_options(self) -> None: ... - db: Any + db: Incomplete def run(self) -> None: ... def add_files(self) -> None: ... def add_find_python(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi index 89c43e1b974c..83b4161094c5 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command @@ -7,44 +8,44 @@ class bdist_rpm(Command): user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] negative_opt: ClassVar[dict[str, str]] - bdist_base: Any - rpm_base: Any - dist_dir: Any - python: Any - fix_python: Any - spec_only: Any - binary_only: Any - source_only: Any - use_bzip2: Any - distribution_name: Any - group: Any - release: Any - serial: Any - vendor: Any - packager: Any - doc_files: Any - changelog: Any - icon: Any - prep_script: Any - build_script: Any - install_script: Any - clean_script: Any - verify_script: Any - pre_install: Any - post_install: Any - pre_uninstall: Any - post_uninstall: Any - prep: Any - provides: Any - requires: Any - conflicts: Any - build_requires: Any - obsoletes: Any + bdist_base: Incomplete + rpm_base: Incomplete + dist_dir: Incomplete + python: Incomplete + fix_python: Incomplete + spec_only: Incomplete + binary_only: Incomplete + source_only: Incomplete + use_bzip2: Incomplete + distribution_name: Incomplete + group: Incomplete + release: Incomplete + serial: Incomplete + vendor: Incomplete + packager: Incomplete + doc_files: Incomplete + changelog: Incomplete + icon: Incomplete + prep_script: Incomplete + build_script: Incomplete + install_script: Incomplete + clean_script: Incomplete + verify_script: Incomplete + pre_install: Incomplete + post_install: Incomplete + pre_uninstall: Incomplete + post_uninstall: Incomplete + prep: Incomplete + provides: Incomplete + requires: Incomplete + conflicts: Incomplete + build_requires: Incomplete + obsoletes: Incomplete keep_temp: int use_rpm_opt_flags: int rpm3_mode: int no_autoreq: int - force_arch: Any + force_arch: Incomplete quiet: int def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build.pyi index 78ba6b7042dc..3ec0c9614d62 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build.pyi @@ -1,4 +1,4 @@ -from _typeshed import Unused +from _typeshed import Incomplete, Unused from collections.abc import Callable from typing import Any, ClassVar @@ -12,17 +12,17 @@ class build(Command): boolean_options: ClassVar[list[str]] help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] build_base: str - build_purelib: Any - build_platlib: Any - build_lib: Any - build_temp: Any - build_scripts: Any - compiler: Any - plat_name: Any - debug: Any + build_purelib: Incomplete + build_platlib: Incomplete + build_lib: Incomplete + build_temp: Incomplete + build_scripts: Incomplete + compiler: Incomplete + plat_name: Incomplete + debug: Incomplete force: int - executable: Any - parallel: Any + executable: Incomplete + parallel: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_clib.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_clib.pyi index 1f66e2efc20c..69cfbe7120d8 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_clib.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_clib.pyi @@ -1,6 +1,6 @@ -from _typeshed import Unused +from _typeshed import Incomplete, Unused from collections.abc import Callable -from typing import Any, ClassVar +from typing import ClassVar from ..cmd import Command @@ -11,15 +11,15 @@ class build_clib(Command): user_options: ClassVar[list[tuple[str, str, str]]] boolean_options: ClassVar[list[str]] help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - build_clib: Any - build_temp: Any - libraries: Any - include_dirs: Any - define: Any - undef: Any - debug: Any + build_clib: Incomplete + build_temp: Incomplete + libraries: Incomplete + include_dirs: Incomplete + define: Incomplete + undef: Incomplete + debug: Incomplete force: int - compiler: Any + compiler: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_ext.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_ext.pyi index a0813c314021..c5a9b5d508f0 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_ext.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_ext.pyi @@ -1,40 +1,40 @@ -from _typeshed import Unused +from _typeshed import Incomplete, Unused from collections.abc import Callable -from typing import Any, ClassVar +from typing import ClassVar from ..cmd import Command -extension_name_re: Any +extension_name_re: Incomplete def show_compilers() -> None: ... class build_ext(Command): description: str - sep_by: Any + sep_by: Incomplete user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - extensions: Any - build_lib: Any - plat_name: Any - build_temp: Any + extensions: Incomplete + build_lib: Incomplete + plat_name: Incomplete + build_temp: Incomplete inplace: int - package: Any - include_dirs: Any - define: Any - undef: Any - libraries: Any - library_dirs: Any - rpath: Any - link_objects: Any - debug: Any - force: Any - compiler: Any - swig: Any - swig_cpp: Any - swig_opts: Any - user: Any - parallel: Any + package: Incomplete + include_dirs: Incomplete + define: Incomplete + undef: Incomplete + libraries: Incomplete + library_dirs: Incomplete + rpath: Incomplete + link_objects: Incomplete + debug: Incomplete + force: Incomplete + compiler: Incomplete + swig: Incomplete + swig_cpp: Incomplete + swig_opts: Incomplete + user: Incomplete + parallel: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_py.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_py.pyi index 90f06751416a..23ed230bb2d8 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_py.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_py.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar, Literal +from _typeshed import Incomplete +from typing import ClassVar, Literal from ..cmd import Command from ..util import Mixin2to3 as Mixin2to3 @@ -8,17 +9,17 @@ class build_py(Command): user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] negative_opt: ClassVar[dict[str, str]] - build_lib: Any - py_modules: Any - package: Any - package_data: Any - package_dir: Any + build_lib: Incomplete + py_modules: Incomplete + package: Incomplete + package_data: Incomplete + package_dir: Incomplete compile: int optimize: int - force: Any + force: Incomplete def initialize_options(self) -> None: ... - packages: Any - data_files: Any + packages: Incomplete + data_files: Incomplete def finalize_options(self) -> None: ... def run(self) -> None: ... def get_data_files(self): ... @@ -32,13 +33,13 @@ class build_py(Command): def find_all_modules(self): ... def get_source_files(self): ... def get_module_outfile(self, build_dir, package, module): ... - def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1): ... + def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1) -> list[str]: ... def build_module(self, module, module_file, package): ... def build_modules(self) -> None: ... def build_packages(self) -> None: ... def byte_compile(self, files) -> None: ... class build_py_2to3(build_py, Mixin2to3): - updated_files: Any + updated_files: Incomplete def run(self) -> None: ... def build_module(self, module, module_file, package): ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi index 7871bb8a5719..8372919bbd53 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.pyi @@ -1,19 +1,20 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command from ..util import Mixin2to3 as Mixin2to3 -first_line_re: Any +first_line_re: Incomplete class build_scripts(Command): description: str user_options: ClassVar[list[tuple[str, str, str]]] boolean_options: ClassVar[list[str]] - build_dir: Any - scripts: Any - force: Any - executable: Any - outfiles: Any + build_dir: Incomplete + scripts: Incomplete + force: Incomplete + executable: Incomplete + outfiles: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def get_source_files(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/check.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/check.pyi index e69627d20c7a..2c807fd2c439 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/check.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/check.pyi @@ -1,3 +1,4 @@ +from _typeshed import Incomplete from typing import Any, ClassVar, Final, Literal from typing_extensions import TypeAlias @@ -9,13 +10,13 @@ _Reporter: TypeAlias = Any # really docutils.utils.Reporter # Depends on a third-party stub. Since distutils is deprecated anyway, # it's easier to just suppress the "any subclassing" error. class SilentReporter(_Reporter): - messages: Any + messages: Incomplete def __init__( self, source, report_level, halt_level, - stream: Any | None = ..., + stream: Incomplete | None = ..., debug: bool | Literal[0, 1] = 0, encoding: str = ..., error_handler: str = ..., diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/clean.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/clean.pyi index 55f0a0eeaf10..0f3768d6dcf4 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/clean.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/clean.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command @@ -6,12 +7,12 @@ class clean(Command): description: str user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] - build_base: Any - build_lib: Any - build_temp: Any - build_scripts: Any - bdist_base: Any - all: Any + build_base: Incomplete + build_lib: Incomplete + build_temp: Incomplete + build_scripts: Incomplete + bdist_base: Incomplete + all: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/config.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/config.pyi index b0910091d5b6..562ff3a5271f 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/config.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/config.pyi @@ -1,7 +1,7 @@ -from _typeshed import StrOrBytesPath +from _typeshed import Incomplete, StrOrBytesPath from collections.abc import Sequence from re import Pattern -from typing import Any, ClassVar, Final, Literal +from typing import ClassVar, Final, Literal from ..ccompiler import CCompiler from ..cmd import Command @@ -81,4 +81,4 @@ class config(Command): self, header: str, include_dirs: Sequence[str] | None = None, library_dirs: Sequence[str] | None = None, lang: str = "c" ) -> bool: ... -def dump_file(filename: StrOrBytesPath, head: Any | None = None) -> None: ... +def dump_file(filename: StrOrBytesPath, head: Incomplete | None = None) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install.pyi index 24a4eff2fb10..1714e01a2c28 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install.pyi @@ -1,4 +1,5 @@ import sys +from _typeshed import Incomplete from collections.abc import Callable from typing import Any, ClassVar, Final, Literal @@ -18,33 +19,33 @@ class install(Command): boolean_options: ClassVar[list[str]] negative_opt: ClassVar[dict[str, str]] prefix: str | None - exec_prefix: Any + exec_prefix: Incomplete home: str | None user: bool - install_base: Any - install_platbase: Any + install_base: Incomplete + install_platbase: Incomplete root: str | None - install_purelib: Any - install_platlib: Any - install_headers: Any + install_purelib: Incomplete + install_platlib: Incomplete + install_headers: Incomplete install_lib: str | None - install_scripts: Any - install_data: Any - install_userbase: Any - install_usersite: Any - compile: Any - optimize: Any - extra_path: Any + install_scripts: Incomplete + install_data: Incomplete + install_userbase: Incomplete + install_usersite: Incomplete + compile: Incomplete + optimize: Incomplete + extra_path: Incomplete install_path_file: int force: int skip_build: int warn_dir: int - build_base: Any - build_lib: Any - record: Any + build_base: Incomplete + build_lib: Incomplete + record: Incomplete def initialize_options(self) -> None: ... - config_vars: Any - install_libbase: Any + config_vars: Incomplete + install_libbase: Incomplete def finalize_options(self) -> None: ... def dump_dirs(self, msg) -> None: ... def finalize_unix(self) -> None: ... @@ -53,8 +54,8 @@ class install(Command): def expand_basedirs(self) -> None: ... def expand_dirs(self) -> None: ... def convert_paths(self, *names) -> None: ... - path_file: Any - extra_dirs: Any + path_file: Incomplete + extra_dirs: Incomplete def handle_extra_path(self) -> None: ... def change_roots(self, *names) -> None: ... def create_home_path(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_data.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_data.pyi index 342c7a7ccca4..609de62b04b5 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_data.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_data.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command @@ -6,11 +7,11 @@ class install_data(Command): description: str user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] - install_dir: Any - outfiles: Any - root: Any + install_dir: Incomplete + outfiles: Incomplete + root: Incomplete force: int - data_files: Any + data_files: Incomplete warn_dir: int def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi index 3fd54989d14f..75bb906ce582 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.pyi @@ -1,14 +1,15 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command class install_egg_info(Command): description: ClassVar[str] user_options: ClassVar[list[tuple[str, str, str]]] - install_dir: Any + install_dir: Incomplete def initialize_options(self) -> None: ... - target: Any - outputs: Any + target: Incomplete + outputs: Incomplete def finalize_options(self) -> None: ... def run(self) -> None: ... def get_outputs(self) -> list[str]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_headers.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_headers.pyi index 7854d2393a98..3caad8a07dca 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_headers.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_headers.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command @@ -6,9 +7,9 @@ class install_headers(Command): description: str user_options: ClassVar[list[tuple[str, str, str]]] boolean_options: ClassVar[list[str]] - install_dir: Any + install_dir: Incomplete force: int - outfiles: Any + outfiles: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_lib.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_lib.pyi index 149ecae89781..a537e254904a 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_lib.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar, Final +from _typeshed import Incomplete +from typing import ClassVar, Final from ..cmd import Command @@ -9,12 +10,12 @@ class install_lib(Command): user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] negative_opt: ClassVar[dict[str, str]] - install_dir: Any - build_dir: Any + install_dir: Incomplete + build_dir: Incomplete force: int - compile: Any - optimize: Any - skip_build: Any + compile: Incomplete + optimize: Incomplete + skip_build: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi index 5ee5589ad33d..658594f32e43 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..cmd import Command @@ -6,13 +7,13 @@ class install_scripts(Command): description: str user_options: ClassVar[list[tuple[str, str | None, str]]] boolean_options: ClassVar[list[str]] - install_dir: Any + install_dir: Incomplete force: int - build_dir: Any - skip_build: Any + build_dir: Incomplete + skip_build: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... - outfiles: Any + outfiles: Incomplete def run(self) -> None: ... def get_inputs(self): ... def get_outputs(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/register.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/register.pyi index a5e251d2d01e..cf98e178a9ba 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/register.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/register.pyi @@ -1,3 +1,4 @@ +from _typeshed import Incomplete from collections.abc import Callable from typing import Any, ClassVar @@ -17,4 +18,4 @@ class register(PyPIRCCommand): def verify_metadata(self) -> None: ... def send_metadata(self) -> None: ... def build_post_data(self, action): ... - def post_to_server(self, data, auth: Any | None = None): ... + def post_to_server(self, data, auth: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/sdist.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/sdist.pyi index 5b7fe2419551..48a140714dda 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/sdist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/sdist.pyi @@ -1,4 +1,4 @@ -from _typeshed import Unused +from _typeshed import Incomplete, Unused from collections.abc import Callable from typing import Any, ClassVar @@ -16,22 +16,22 @@ class sdist(Command): # Any to work around variance issues sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] READMES: ClassVar[tuple[str, ...]] - template: Any - manifest: Any + template: Incomplete + manifest: Incomplete use_defaults: int prune: int manifest_only: int force_manifest: int - formats: Any + formats: Incomplete keep_temp: int - dist_dir: Any - archive_files: Any + dist_dir: Incomplete + archive_files: Incomplete metadata_check: int - owner: Any - group: Any + owner: Incomplete + group: Incomplete def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... - filelist: Any + filelist: Incomplete def run(self) -> None: ... def check_metadata(self) -> None: ... def get_file_list(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/upload.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/upload.pyi index e6b77825c5f5..afcfbaf48677 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/upload.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/command/upload.pyi @@ -1,4 +1,5 @@ -from typing import Any, ClassVar +from _typeshed import Incomplete +from typing import ClassVar from ..config import PyPIRCCommand @@ -8,10 +9,10 @@ class upload(PyPIRCCommand): password: str show_response: int sign: bool - identity: Any + identity: Incomplete def initialize_options(self) -> None: ... - repository: Any - realm: Any + repository: Incomplete + realm: Incomplete def finalize_options(self) -> None: ... def run(self) -> None: ... def upload_file(self, command: str, pyversion: str, filename: str) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/core.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/core.pyi index a4d21f8ddd7b..174f24991351 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/core.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/core.pyi @@ -1,4 +1,4 @@ -from _typeshed import StrOrBytesPath +from _typeshed import Incomplete, StrOrBytesPath from collections.abc import Mapping from distutils.cmd import Command as Command from distutils.dist import Distribution as Distribution @@ -32,7 +32,7 @@ def setup( distclass: type[Distribution] = ..., script_name: str = ..., script_args: list[str] = ..., - options: Mapping[str, Any] = ..., + options: Mapping[str, Incomplete] = ..., license: str = ..., keywords: list[str] | str = ..., platforms: list[str] | str = ..., @@ -43,7 +43,7 @@ def setup( provides: list[str] = ..., requires: list[str] = ..., command_packages: list[str] = ..., - command_options: Mapping[str, Mapping[str, tuple[Any, Any]]] = ..., + command_options: Mapping[str, Mapping[str, tuple[Incomplete, Incomplete]]] = ..., package_data: Mapping[str, list[str]] = ..., include_package_data: bool | Literal[0, 1] = ..., libraries: list[str] = ..., @@ -52,6 +52,7 @@ def setup( include_dirs: list[str] = ..., password: str = ..., fullname: str = ..., + # Custom Distributions could accept more params **attrs: Any, ) -> Distribution: ... def run_setup(script_name: str, script_args: list[str] | None = None, stop_after: str = "run") -> Distribution: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/log.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/log.pyi index 0ea135c28371..7246dd6be0cd 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/distutils/log.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/distutils/log.pyi @@ -8,6 +8,7 @@ FATAL: Final = 5 class Log: def __init__(self, threshold: int = 3) -> None: ... + # Arbitrary msg args' type depends on the format method def log(self, level: int, msg: str, *args: Any) -> None: ... def debug(self, msg: str, *args: Any) -> None: ... def info(self, msg: str, *args: Any) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/email/message.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/email/message.pyi index f04b014431f9..ebad05a1cf7b 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/email/message.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/email/message.pyi @@ -1,3 +1,4 @@ +from _typeshed import MaybeNone from collections.abc import Generator, Iterator, Sequence from email import _ParamsType, _ParamType from email.charset import Charset @@ -42,17 +43,17 @@ class Message(Generic[_HeaderT, _HeaderParamT]): def get_unixfrom(self) -> str | None: ... def attach(self, payload: _PayloadType) -> None: ... # `i: int` without a multipart payload results in an error - # `| Any`: can be None for cleared or unset payload, but annoying to check + # `| MaybeNone` acts like `| Any`: can be None for cleared or unset payload, but annoying to check @overload # multipart def get_payload(self, i: int, decode: Literal[True]) -> None: ... @overload # multipart - def get_payload(self, i: int, decode: Literal[False] = False) -> _PayloadType | Any: ... + def get_payload(self, i: int, decode: Literal[False] = False) -> _PayloadType | MaybeNone: ... @overload # either - def get_payload(self, i: None = None, decode: Literal[False] = False) -> _PayloadType | _MultipartPayloadType | Any: ... + def get_payload(self, i: None = None, decode: Literal[False] = False) -> _PayloadType | _MultipartPayloadType | MaybeNone: ... @overload # not multipart - def get_payload(self, i: None = None, *, decode: Literal[True]) -> _EncodedPayloadType | Any: ... + def get_payload(self, i: None = None, *, decode: Literal[True]) -> _EncodedPayloadType | MaybeNone: ... @overload # not multipart, IDEM but w/o kwarg - def get_payload(self, i: None, decode: Literal[True]) -> _EncodedPayloadType | Any: ... + def get_payload(self, i: None, decode: Literal[True]) -> _EncodedPayloadType | MaybeNone: ... # If `charset=None` and payload supports both `encode` AND `decode`, # then an invalid payload could be passed, but this is unlikely # Not[_SupportsEncodeToPayload] @@ -75,7 +76,7 @@ class Message(Generic[_HeaderT, _HeaderParamT]): # This is important for protocols using __getitem__, like SupportsKeysAndGetItem # Morally, the return type should be `AnyOf[_HeaderType, None]`, # so using "the Any trick" instead. - def __getitem__(self, name: str) -> _HeaderT | Any: ... + def __getitem__(self, name: str) -> _HeaderT | MaybeNone: ... def __setitem__(self, name: str, val: _HeaderParamT) -> None: ... def __delitem__(self, name: str) -> None: ... def keys(self) -> list[str]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/enum.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/enum.pyi index 5c82b07c4185..3b6c325522d7 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/enum.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/enum.pyi @@ -316,13 +316,24 @@ else: __rand__ = __and__ __rxor__ = __xor__ -# subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto() -class auto(IntFlag): +class auto: _value_: Any @_magic_enum_attr def value(self) -> Any: ... def __new__(cls) -> Self: ... + # These don't exist, but auto is basically immediately replaced with + # either an int or a str depending on the type of the enum. StrEnum's auto + # shouldn't have these, but they're needed for int versions of auto (mostly the __or__). + # Ideally type checkers would special case auto enough to handle this, + # but until then this is a slightly inaccurate helping hand. + def __or__(self, other: int | Self) -> Self: ... + def __and__(self, other: int | Self) -> Self: ... + def __xor__(self, other: int | Self) -> Self: ... + __ror__ = __or__ + __rand__ = __and__ + __rxor__ = __xor__ + if sys.version_info >= (3, 11): def pickle_by_global_name(self: Enum, proto: int) -> str: ... def pickle_by_enum_name(self: _EnumMemberT, proto: int) -> tuple[Callable[..., Any], tuple[type[_EnumMemberT], str]]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/fileinput.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/fileinput.pyi index 1e6aa78e2607..bf6daad0aea7 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/fileinput.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/fileinput.pyi @@ -1,8 +1,8 @@ import sys from _typeshed import AnyStr_co, StrOrBytesPath -from collections.abc import Callable, Iterable, Iterator +from collections.abc import Callable, Iterable from types import TracebackType -from typing import IO, Any, AnyStr, Literal, Protocol, overload +from typing import IO, Any, AnyStr, Generic, Literal, Protocol, overload from typing_extensions import Self, TypeAlias if sys.version_info >= (3, 9): @@ -107,7 +107,7 @@ def fileno() -> int: ... def isfirstline() -> bool: ... def isstdin() -> bool: ... -class FileInput(Iterator[AnyStr]): +class FileInput(Generic[AnyStr]): if sys.version_info >= (3, 10): # encoding and errors are added @overload diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/hmac.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/hmac.pyi index ac1372dd1e9c..eccfbdc235f4 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/hmac.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/hmac.pyi @@ -1,12 +1,11 @@ from _typeshed import ReadableBuffer, SizedBuffer from collections.abc import Callable +from hashlib import _Hash as _HashlibHash from types import ModuleType -from typing import Any, AnyStr, overload +from typing import AnyStr, overload from typing_extensions import TypeAlias -# TODO more precise type for object of hashlib -_Hash: TypeAlias = Any -_DigestMod: TypeAlias = str | Callable[[], _Hash] | ModuleType +_DigestMod: TypeAlias = str | Callable[[], _HashlibHash] | ModuleType trans_5C: bytes trans_36: bytes diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/http/client.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/http/client.pyi index f47c744a6c7d..3db764ef1e7c 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/http/client.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/http/client.pyi @@ -3,10 +3,10 @@ import io import ssl import sys import types -from _typeshed import ReadableBuffer, SupportsRead, SupportsReadline, WriteableBuffer +from _typeshed import MaybeNone, ReadableBuffer, SupportsRead, SupportsReadline, WriteableBuffer from collections.abc import Callable, Iterable, Iterator, Mapping from socket import socket -from typing import Any, BinaryIO, TypeVar, overload +from typing import BinaryIO, TypeVar, overload from typing_extensions import Self, TypeAlias __all__ = [ @@ -154,7 +154,7 @@ class HTTPConnection: timeout: float | None host: str port: int - sock: socket | Any # can be `None` if `.connect()` was not called + sock: socket | MaybeNone # can be `None` if `.connect()` was not called def __init__( self, host: str, @@ -187,7 +187,7 @@ class HTTPConnection: class HTTPSConnection(HTTPConnection): # Can be `None` if `.connect()` was not called: - sock: ssl.SSLSocket | Any + sock: ssl.SSLSocket | MaybeNone if sys.version_info >= (3, 12): def __init__( self, diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/http/cookiejar.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/http/cookiejar.pyi index 56097f163afd..31e1d3fc8378 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/http/cookiejar.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/http/cookiejar.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import StrPath -from collections.abc import Iterable, Iterator, Sequence +from collections.abc import Iterator, Sequence from http.client import HTTPResponse from re import Pattern from typing import ClassVar, TypeVar, overload @@ -21,7 +21,7 @@ _T = TypeVar("_T") class LoadError(OSError): ... -class CookieJar(Iterable[Cookie]): +class CookieJar: non_word_re: ClassVar[Pattern[str]] # undocumented quote_re: ClassVar[Pattern[str]] # undocumented strict_domain_re: ClassVar[Pattern[str]] # undocumented diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/io.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/io.pyi index dd61b4e88c1d..5c26cb245a2f 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/io.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/io.pyi @@ -1,13 +1,26 @@ import abc -import builtins -import codecs import sys -from _typeshed import FileDescriptorOrPath, MaybeNone, ReadableBuffer, WriteableBuffer -from collections.abc import Callable, Iterable, Iterator -from os import _Opener -from types import TracebackType -from typing import IO, Any, BinaryIO, Final, Generic, Literal, Protocol, TextIO, TypeVar, overload, type_check_only -from typing_extensions import Self +from _io import ( + DEFAULT_BUFFER_SIZE as DEFAULT_BUFFER_SIZE, + BlockingIOError as BlockingIOError, + BufferedRandom as BufferedRandom, + BufferedReader as BufferedReader, + BufferedRWPair as BufferedRWPair, + BufferedWriter as BufferedWriter, + BytesIO as BytesIO, + FileIO as FileIO, + IncrementalNewlineDecoder as IncrementalNewlineDecoder, + StringIO as StringIO, + TextIOWrapper as TextIOWrapper, + _BufferedIOBase, + _IOBase, + _RawIOBase, + _TextIOBase, + _WrappedBuffer as _WrappedBuffer, # used elsewhere in typeshed + open as open, + open_code as open_code, +) +from typing import Final __all__ = [ "BlockingIOError", @@ -32,208 +45,16 @@ __all__ = [ ] if sys.version_info >= (3, 11): - __all__ += ["DEFAULT_BUFFER_SIZE", "IncrementalNewlineDecoder", "text_encoding"] - -_T = TypeVar("_T") + from _io import text_encoding as text_encoding -DEFAULT_BUFFER_SIZE: Final = 8192 + __all__ += ["DEFAULT_BUFFER_SIZE", "IncrementalNewlineDecoder", "text_encoding"] SEEK_SET: Final = 0 SEEK_CUR: Final = 1 SEEK_END: Final = 2 -open = builtins.open - -def open_code(path: str) -> IO[bytes]: ... - -BlockingIOError = builtins.BlockingIOError - class UnsupportedOperation(OSError, ValueError): ... - -class IOBase(metaclass=abc.ABCMeta): - def __iter__(self) -> Iterator[bytes]: ... - def __next__(self) -> bytes: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def close(self) -> None: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def readable(self) -> bool: ... - read: Callable[..., Any] - def readlines(self, hint: int = -1, /) -> list[bytes]: ... - def seek(self, offset: int, whence: int = ..., /) -> int: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int | None = ..., /) -> int: ... - def writable(self) -> bool: ... - write: Callable[..., Any] - def writelines(self, lines: Iterable[ReadableBuffer], /) -> None: ... - def readline(self, size: int | None = -1, /) -> bytes: ... - def __del__(self) -> None: ... - @property - def closed(self) -> bool: ... - def _checkClosed(self) -> None: ... # undocumented - -class RawIOBase(IOBase): - def readall(self) -> bytes: ... - # The following methods can return None if the file is in non-blocking mode - # and no data is available. - def readinto(self, buffer: WriteableBuffer, /) -> int | MaybeNone: ... - def write(self, b: ReadableBuffer, /) -> int | MaybeNone: ... - def read(self, size: int = -1, /) -> bytes | MaybeNone: ... - -class BufferedIOBase(IOBase): - def detach(self) -> RawIOBase: ... - def readinto(self, buffer: WriteableBuffer, /) -> int: ... - def write(self, buffer: ReadableBuffer, /) -> int: ... - def readinto1(self, buffer: WriteableBuffer, /) -> int: ... - def read(self, size: int | None = ..., /) -> bytes: ... - def read1(self, size: int = ..., /) -> bytes: ... - -class FileIO(RawIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of writelines in the base classes - mode: str - # The type of "name" equals the argument passed in to the constructor, - # but that can make FileIO incompatible with other I/O types that assume - # "name" is a str. In the future, making FileIO generic might help. - name: Any - def __init__( - self, file: FileDescriptorOrPath, mode: str = ..., closefd: bool = ..., opener: _Opener | None = ... - ) -> None: ... - @property - def closefd(self) -> bool: ... - def __enter__(self) -> Self: ... - -class BytesIO(BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of methods in the base classes - def __init__(self, initial_bytes: ReadableBuffer = ...) -> None: ... - # BytesIO does not contain a "name" field. This workaround is necessary - # to allow BytesIO sub-classes to add this field, as it is defined - # as a read-only property on IO[]. - name: Any - def __enter__(self) -> Self: ... - def getvalue(self) -> bytes: ... - def getbuffer(self) -> memoryview: ... - def read1(self, size: int | None = -1, /) -> bytes: ... - -class BufferedReader(BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of methods in the base classes - raw: RawIOBase - def __enter__(self) -> Self: ... - def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... - def peek(self, size: int = 0, /) -> bytes: ... - -class BufferedWriter(BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible definitions of writelines in the base classes - raw: RawIOBase - def __enter__(self) -> Self: ... - def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... - def write(self, buffer: ReadableBuffer, /) -> int: ... - -class BufferedRandom(BufferedReader, BufferedWriter): # type: ignore[misc] # incompatible definitions of methods in the base classes - def __enter__(self) -> Self: ... - def seek(self, target: int, whence: int = 0, /) -> int: ... # stubtest needs this - -class BufferedRWPair(BufferedIOBase): - def __init__(self, reader: RawIOBase, writer: RawIOBase, buffer_size: int = ...) -> None: ... - def peek(self, size: int = ..., /) -> bytes: ... - -class TextIOBase(IOBase): - encoding: str - errors: str | None - newlines: str | tuple[str, ...] | None - def __iter__(self) -> Iterator[str]: ... # type: ignore[override] - def __next__(self) -> str: ... # type: ignore[override] - def detach(self) -> BinaryIO: ... - def write(self, s: str, /) -> int: ... - def writelines(self, lines: Iterable[str], /) -> None: ... # type: ignore[override] - def readline(self, size: int = ..., /) -> str: ... # type: ignore[override] - def readlines(self, hint: int = -1, /) -> list[str]: ... # type: ignore[override] - def read(self, size: int | None = ..., /) -> str: ... - -@type_check_only -class _WrappedBuffer(Protocol): - # "name" is wrapped by TextIOWrapper. Its type is inconsistent between - # the various I/O types, see the comments on TextIOWrapper.name and - # TextIO.name. - @property - def name(self) -> Any: ... - @property - def closed(self) -> bool: ... - def read(self, size: int = ..., /) -> ReadableBuffer: ... - # Optional: def read1(self, size: int, /) -> ReadableBuffer: ... - def write(self, b: bytes, /) -> object: ... - def flush(self) -> object: ... - def close(self) -> object: ... - def seekable(self) -> bool: ... - def readable(self) -> bool: ... - def writable(self) -> bool: ... - def truncate(self, size: int, /) -> int: ... - def fileno(self) -> int: ... - def isatty(self) -> bool: ... - # Optional: Only needs to be present if seekable() returns True. - # def seek(self, offset: Literal[0], whence: Literal[2]) -> int: ... - # def tell(self) -> int: ... - -_BufferT_co = TypeVar("_BufferT_co", bound=_WrappedBuffer, default=_WrappedBuffer, covariant=True) - -class TextIOWrapper(TextIOBase, TextIO, Generic[_BufferT_co]): # type: ignore[misc] # incompatible definitions of write in the base classes - def __init__( - self, - buffer: _BufferT_co, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool = False, - write_through: bool = False, - ) -> None: ... - # Equals the "buffer" argument passed in to the constructor. - @property - def buffer(self) -> _BufferT_co: ... # type: ignore[override] - @property - def closed(self) -> bool: ... - @property - def line_buffering(self) -> bool: ... - @property - def write_through(self) -> bool: ... - def reconfigure( - self, - *, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool | None = None, - write_through: bool | None = None, - ) -> None: ... - # These are inherited from TextIOBase, but must exist in the stub to satisfy mypy. - def __enter__(self) -> Self: ... - def __iter__(self) -> Iterator[str]: ... # type: ignore[override] - def __next__(self) -> str: ... # type: ignore[override] - def writelines(self, lines: Iterable[str], /) -> None: ... # type: ignore[override] - def readline(self, size: int = -1, /) -> str: ... # type: ignore[override] - def readlines(self, hint: int = -1, /) -> list[str]: ... # type: ignore[override] - # Equals the "buffer" argument passed in to the constructor. - def detach(self) -> _BufferT_co: ... # type: ignore[override] - # TextIOWrapper's version of seek only supports a limited subset of - # operations. - def seek(self, cookie: int, whence: int = 0, /) -> int: ... - -class StringIO(TextIOWrapper): - def __init__(self, initial_value: str | None = ..., newline: str | None = ...) -> None: ... - # StringIO does not contain a "name" field. This workaround is necessary - # to allow StringIO sub-classes to add this field, as it is defined - # as a read-only property on IO[]. - name: Any - def getvalue(self) -> str: ... - -class IncrementalNewlineDecoder(codecs.IncrementalDecoder): - def __init__(self, decoder: codecs.IncrementalDecoder | None, translate: bool, errors: str = ...) -> None: ... - def decode(self, input: ReadableBuffer | str, final: bool = False) -> str: ... - @property - def newlines(self) -> str | tuple[str, ...] | None: ... - def setstate(self, state: tuple[bytes, int], /) -> None: ... - -if sys.version_info >= (3, 10): - @overload - def text_encoding(encoding: None, stacklevel: int = 2, /) -> Literal["locale", "utf-8"]: ... - @overload - def text_encoding(encoding: _T, stacklevel: int = 2, /) -> _T: ... +class IOBase(_IOBase, metaclass=abc.ABCMeta): ... +class RawIOBase(_RawIOBase, IOBase): ... +class BufferedIOBase(_BufferedIOBase, IOBase): ... +class TextIOBase(_TextIOBase, IOBase): ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/ipaddress.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/ipaddress.pyi index f51ea87dcfcf..fa2faf8e6c13 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/ipaddress.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/ipaddress.pyi @@ -1,6 +1,6 @@ import sys from collections.abc import Iterable, Iterator -from typing import Any, Final, Generic, Literal, SupportsInt, TypeVar, overload +from typing import Any, Final, Generic, Literal, TypeVar, overload from typing_extensions import Self, TypeAlias # Undocumented length constants @@ -31,7 +31,7 @@ class _IPAddressBase: @property def version(self) -> int: ... -class _BaseAddress(_IPAddressBase, SupportsInt): +class _BaseAddress(_IPAddressBase): def __init__(self, address: object) -> None: ... def __add__(self, other: int) -> Self: ... def __hash__(self) -> int: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/itertools.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/itertools.pyi index 1635b6a0a072..013c3cba120f 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/itertools.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/itertools.pyi @@ -1,4 +1,5 @@ import sys +from _typeshed import MaybeNone from collections.abc import Callable, Iterable, Iterator from typing import Any, Generic, Literal, SupportsComplex, SupportsFloat, SupportsIndex, SupportsInt, TypeVar, overload from typing_extensions import Self, TypeAlias @@ -28,7 +29,7 @@ _Predicate: TypeAlias = Callable[[_T], object] # Technically count can take anything that implements a number protocol and has an add method # but we can't enforce the add method -class count(Iterator[_N]): +class count(Generic[_N]): @overload def __new__(cls) -> count[int]: ... @overload @@ -38,12 +39,12 @@ class count(Iterator[_N]): def __next__(self) -> _N: ... def __iter__(self) -> Self: ... -class cycle(Iterator[_T]): +class cycle(Generic[_T]): def __init__(self, iterable: Iterable[_T], /) -> None: ... def __next__(self) -> _T: ... def __iter__(self) -> Self: ... -class repeat(Iterator[_T]): +class repeat(Generic[_T]): @overload def __init__(self, object: _T) -> None: ... @overload @@ -52,7 +53,7 @@ class repeat(Iterator[_T]): def __iter__(self) -> Self: ... def __length_hint__(self) -> int: ... -class accumulate(Iterator[_T]): +class accumulate(Generic[_T]): @overload def __init__(self, iterable: Iterable[_T], func: None = None, *, initial: _T | None = ...) -> None: ... @overload @@ -60,7 +61,7 @@ class accumulate(Iterator[_T]): def __iter__(self) -> Self: ... def __next__(self) -> _T: ... -class chain(Iterator[_T]): +class chain(Generic[_T]): def __init__(self, *iterables: Iterable[_T]) -> None: ... def __next__(self) -> _T: ... def __iter__(self) -> Self: ... @@ -70,22 +71,22 @@ class chain(Iterator[_T]): if sys.version_info >= (3, 9): def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... -class compress(Iterator[_T]): +class compress(Generic[_T]): def __init__(self, data: Iterable[_T], selectors: Iterable[Any]) -> None: ... def __iter__(self) -> Self: ... def __next__(self) -> _T: ... -class dropwhile(Iterator[_T]): +class dropwhile(Generic[_T]): def __init__(self, predicate: _Predicate[_T], iterable: Iterable[_T], /) -> None: ... def __iter__(self) -> Self: ... def __next__(self) -> _T: ... -class filterfalse(Iterator[_T]): +class filterfalse(Generic[_T]): def __init__(self, predicate: _Predicate[_T] | None, iterable: Iterable[_T], /) -> None: ... def __iter__(self) -> Self: ... def __next__(self) -> _T: ... -class groupby(Iterator[tuple[_T_co, Iterator[_S_co]]], Generic[_T_co, _S_co]): +class groupby(Generic[_T_co, _S_co]): @overload def __new__(cls, iterable: Iterable[_T1], key: None = None) -> groupby[_T1, _T1]: ... @overload @@ -93,7 +94,7 @@ class groupby(Iterator[tuple[_T_co, Iterator[_S_co]]], Generic[_T_co, _S_co]): def __iter__(self) -> Self: ... def __next__(self) -> tuple[_T_co, Iterator[_S_co]]: ... -class islice(Iterator[_T]): +class islice(Generic[_T]): @overload def __init__(self, iterable: Iterable[_T], stop: int | None, /) -> None: ... @overload @@ -101,19 +102,19 @@ class islice(Iterator[_T]): def __iter__(self) -> Self: ... def __next__(self) -> _T: ... -class starmap(Iterator[_T_co]): +class starmap(Generic[_T_co]): def __new__(cls, function: Callable[..., _T], iterable: Iterable[Iterable[Any]], /) -> starmap[_T]: ... def __iter__(self) -> Self: ... def __next__(self) -> _T_co: ... -class takewhile(Iterator[_T]): +class takewhile(Generic[_T]): def __init__(self, predicate: _Predicate[_T], iterable: Iterable[_T], /) -> None: ... def __iter__(self) -> Self: ... def __next__(self) -> _T: ... def tee(iterable: Iterable[_T], n: int = 2, /) -> tuple[Iterator[_T], ...]: ... -class zip_longest(Iterator[_T_co]): +class zip_longest(Generic[_T_co]): # one iterable (fillvalue doesn't matter) @overload def __new__(cls, iter1: Iterable[_T1], /, *, fillvalue: object = ...) -> zip_longest[tuple[_T1]]: ... @@ -122,7 +123,7 @@ class zip_longest(Iterator[_T_co]): # In the overloads without fillvalue, all of the tuple members could theoretically be None, # but we return Any instead to avoid false positives for code where we know one of the iterables # is longer. - def __new__(cls, iter1: Iterable[_T1], iter2: Iterable[_T2], /) -> zip_longest[tuple[_T1 | Any, _T2 | Any]]: ... + def __new__(cls, iter1: Iterable[_T1], iter2: Iterable[_T2], /) -> zip_longest[tuple[_T1 | MaybeNone, _T2 | MaybeNone]]: ... @overload def __new__( cls, iter1: Iterable[_T1], iter2: Iterable[_T2], /, *, fillvalue: _T @@ -131,7 +132,7 @@ class zip_longest(Iterator[_T_co]): @overload def __new__( cls, iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], / - ) -> zip_longest[tuple[_T1 | Any, _T2 | Any, _T3 | Any]]: ... + ) -> zip_longest[tuple[_T1 | MaybeNone, _T2 | MaybeNone, _T3 | MaybeNone]]: ... @overload def __new__( cls, iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], /, *, fillvalue: _T @@ -140,7 +141,7 @@ class zip_longest(Iterator[_T_co]): @overload def __new__( cls, iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], / - ) -> zip_longest[tuple[_T1 | Any, _T2 | Any, _T3 | Any, _T4 | Any]]: ... + ) -> zip_longest[tuple[_T1 | MaybeNone, _T2 | MaybeNone, _T3 | MaybeNone, _T4 | MaybeNone]]: ... @overload def __new__( cls, iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], /, *, fillvalue: _T @@ -149,7 +150,7 @@ class zip_longest(Iterator[_T_co]): @overload def __new__( cls, iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5], / - ) -> zip_longest[tuple[_T1 | Any, _T2 | Any, _T3 | Any, _T4 | Any, _T5 | Any]]: ... + ) -> zip_longest[tuple[_T1 | MaybeNone, _T2 | MaybeNone, _T3 | MaybeNone, _T4 | MaybeNone, _T5 | MaybeNone]]: ... @overload def __new__( cls, @@ -174,7 +175,7 @@ class zip_longest(Iterator[_T_co]): iter6: Iterable[_T], /, *iterables: Iterable[_T], - ) -> zip_longest[tuple[_T | Any, ...]]: ... + ) -> zip_longest[tuple[_T | MaybeNone, ...]]: ... @overload def __new__( cls, @@ -191,7 +192,7 @@ class zip_longest(Iterator[_T_co]): def __iter__(self) -> Self: ... def __next__(self) -> _T_co: ... -class product(Iterator[_T_co]): +class product(Generic[_T_co]): @overload def __new__(cls, iter1: Iterable[_T1], /) -> product[tuple[_T1]]: ... @overload @@ -276,7 +277,7 @@ class product(Iterator[_T_co]): def __iter__(self) -> Self: ... def __next__(self) -> _T_co: ... -class permutations(Iterator[_T_co]): +class permutations(Generic[_T_co]): @overload def __new__(cls, iterable: Iterable[_T], r: Literal[2]) -> permutations[tuple[_T, _T]]: ... @overload @@ -290,7 +291,7 @@ class permutations(Iterator[_T_co]): def __iter__(self) -> Self: ... def __next__(self) -> _T_co: ... -class combinations(Iterator[_T_co]): +class combinations(Generic[_T_co]): @overload def __new__(cls, iterable: Iterable[_T], r: Literal[2]) -> combinations[tuple[_T, _T]]: ... @overload @@ -304,7 +305,7 @@ class combinations(Iterator[_T_co]): def __iter__(self) -> Self: ... def __next__(self) -> _T_co: ... -class combinations_with_replacement(Iterator[_T_co]): +class combinations_with_replacement(Generic[_T_co]): @overload def __new__(cls, iterable: Iterable[_T], r: Literal[2]) -> combinations_with_replacement[tuple[_T, _T]]: ... @overload @@ -319,13 +320,13 @@ class combinations_with_replacement(Iterator[_T_co]): def __next__(self) -> _T_co: ... if sys.version_info >= (3, 10): - class pairwise(Iterator[_T_co]): + class pairwise(Generic[_T_co]): def __new__(cls, iterable: Iterable[_T], /) -> pairwise[tuple[_T, _T]]: ... def __iter__(self) -> Self: ... def __next__(self) -> _T_co: ... if sys.version_info >= (3, 12): - class batched(Iterator[tuple[_T_co, ...]], Generic[_T_co]): + class batched(Generic[_T_co]): if sys.version_info >= (3, 13): def __new__(cls, iterable: Iterable[_T_co], n: int, *, strict: bool = False) -> Self: ... else: diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/logging/config.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/logging/config.pyi index 83fe7461cb5c..af57f36715be 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/logging/config.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/logging/config.pyi @@ -116,7 +116,7 @@ class BaseConfigurator: # undocumented def cfg_convert(self, value: str) -> Any: ... def convert(self, value: Any) -> Any: ... def configure_custom(self, config: dict[str, Any]) -> Any: ... - def as_tuple(self, value: list[Any] | tuple[Any]) -> tuple[Any]: ... + def as_tuple(self, value: list[Any] | tuple[Any, ...]) -> tuple[Any, ...]: ... class DictConfigurator(BaseConfigurator): def configure(self) -> None: ... # undocumented diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/mmap.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/mmap.pyi index a0c150d6e7e8..5be7f7b76ba1 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/mmap.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/mmap.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import ReadableBuffer, Unused -from collections.abc import Iterable, Iterator, Sized +from collections.abc import Iterator from typing import Final, Literal, NoReturn, overload from typing_extensions import Self @@ -30,7 +30,7 @@ if sys.platform != "win32": PAGESIZE: int -class mmap(Iterable[int], Sized): +class mmap: if sys.platform == "win32": def __init__(self, fileno: int, length: int, tagname: str | None = ..., access: int = ..., offset: int = ...) -> None: ... else: diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/multiprocessing/pool.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/multiprocessing/pool.pyi index 950ed1d8c56b..61d6d0781213 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/multiprocessing/pool.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/multiprocessing/pool.pyi @@ -1,5 +1,5 @@ import sys -from collections.abc import Callable, Iterable, Iterator, Mapping +from collections.abc import Callable, Iterable, Mapping from types import TracebackType from typing import Any, Final, Generic, TypeVar from typing_extensions import Self @@ -36,7 +36,7 @@ class MapResult(ApplyResult[list[_T]]): error_callback: Callable[[BaseException], object] | None, ) -> None: ... -class IMapIterator(Iterator[_T]): +class IMapIterator(Generic[_T]): def __init__(self, pool: Pool) -> None: ... def __iter__(self) -> Self: ... def next(self, timeout: float | None = None) -> _T: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/operator.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/operator.pyi index 1a817f00f3c1..b73e037f3ed9 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/operator.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/operator.pyi @@ -1,5 +1,66 @@ import sys -from _operator import * +from _operator import ( + abs as abs, + add as add, + and_ as and_, + concat as concat, + contains as contains, + countOf as countOf, + delitem as delitem, + eq as eq, + floordiv as floordiv, + ge as ge, + getitem as getitem, + gt as gt, + iadd as iadd, + iand as iand, + iconcat as iconcat, + ifloordiv as ifloordiv, + ilshift as ilshift, + imatmul as imatmul, + imod as imod, + imul as imul, + index as index, + indexOf as indexOf, + inv as inv, + invert as invert, + ior as ior, + ipow as ipow, + irshift as irshift, + is_ as is_, + is_not as is_not, + isub as isub, + itruediv as itruediv, + ixor as ixor, + le as le, + length_hint as length_hint, + lshift as lshift, + lt as lt, + matmul as matmul, + mod as mod, + mul as mul, + ne as ne, + neg as neg, + not_ as not_, + or_ as or_, + pos as pos, + pow as pow, + rshift as rshift, + setitem as setitem, + sub as sub, + truediv as truediv, + truth as truth, + xor as xor, +) +from _typeshed import SupportsGetItem +from typing import Any, Generic, TypeVar, final, overload +from typing_extensions import TypeVarTuple, Unpack + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_T1 = TypeVar("_T1") +_T2 = TypeVar("_T2") +_Ts = TypeVarTuple("_Ts") __all__ = [ "abs", @@ -59,9 +120,13 @@ __all__ = [ ] if sys.version_info >= (3, 11): + from _operator import call as call + __all__ += ["call"] if sys.version_info >= (3, 14): + from _operator import is_none as is_none, is_not_none as is_not_none + __all__ += ["is_none", "is_not_none"] __lt__ = lt @@ -111,3 +176,40 @@ __itruediv__ = itruediv __ixor__ = ixor if sys.version_info >= (3, 11): __call__ = call + +# At runtime, these classes are implemented in C as part of the _operator module +# However, they consider themselves to live in the operator module, so we'll put +# them here. +@final +class attrgetter(Generic[_T_co]): + @overload + def __new__(cls, attr: str, /) -> attrgetter[Any]: ... + @overload + def __new__(cls, attr: str, attr2: str, /) -> attrgetter[tuple[Any, Any]]: ... + @overload + def __new__(cls, attr: str, attr2: str, attr3: str, /) -> attrgetter[tuple[Any, Any, Any]]: ... + @overload + def __new__(cls, attr: str, attr2: str, attr3: str, attr4: str, /) -> attrgetter[tuple[Any, Any, Any, Any]]: ... + @overload + def __new__(cls, attr: str, /, *attrs: str) -> attrgetter[tuple[Any, ...]]: ... + def __call__(self, obj: Any, /) -> _T_co: ... + +@final +class itemgetter(Generic[_T_co]): + @overload + def __new__(cls, item: _T, /) -> itemgetter[_T]: ... + @overload + def __new__(cls, item1: _T1, item2: _T2, /, *items: Unpack[_Ts]) -> itemgetter[tuple[_T1, _T2, Unpack[_Ts]]]: ... + # __key: _KT_contra in SupportsGetItem seems to be causing variance issues, ie: + # TypeVar "_KT_contra@SupportsGetItem" is contravariant + # "tuple[int, int]" is incompatible with protocol "SupportsIndex" + # preventing [_T_co, ...] instead of [Any, ...] + # + # A suspected mypy issue prevents using [..., _T] instead of [..., Any] here. + # https://github.com/python/mypy/issues/14032 + def __call__(self, obj: SupportsGetItem[Any, Any]) -> Any: ... + +@final +class methodcaller: + def __init__(self, name: str, /, *args: Any, **kwargs: Any) -> None: ... + def __call__(self, obj: Any) -> Any: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/optparse.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/optparse.pyi index b513bb647060..d6db7a06f291 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/optparse.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/optparse.pyi @@ -1,4 +1,4 @@ -from _typeshed import Incomplete +from _typeshed import Incomplete, MaybeNone from abc import abstractmethod from collections.abc import Callable, Iterable, Mapping, Sequence from typing import IO, Any, AnyStr, Literal, NoReturn, overload @@ -56,7 +56,7 @@ class HelpFormatter: current_indent: int default_tag: str help_position: int - help_width: int | Any # initialized as None and computed later as int when storing option strings + help_width: int | MaybeNone # initialized as None and computed later as int when storing option strings indent_increment: int level: int max_help_position: int diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/os/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/os/__init__.pyi index d7bb4883a0f2..833f9b1e56cb 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/os/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/os/__init__.pyi @@ -23,8 +23,9 @@ from abc import abstractmethod from builtins import OSError from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, Sequence from contextlib import AbstractContextManager -from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper as _TextIOWrapper +from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper from subprocess import Popen +from types import TracebackType from typing import ( IO, Any, @@ -578,7 +579,7 @@ def fdopen( newline: str | None = ..., closefd: bool = ..., opener: _Opener | None = ..., -) -> _TextIOWrapper: ... +) -> TextIOWrapper: ... @overload def fdopen( fd: int, @@ -917,9 +918,25 @@ if sys.platform != "win32": if sys.platform != "darwin" and sys.platform != "linux": def plock(op: int, /) -> None: ... -class _wrap_close(_TextIOWrapper): - def __init__(self, stream: _TextIOWrapper, proc: Popen[str]) -> None: ... - def close(self) -> int | None: ... # type: ignore[override] +class _wrap_close: + def __init__(self, stream: TextIOWrapper, proc: Popen[str]) -> None: ... + def close(self) -> int | None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None + ) -> None: ... + def __iter__(self) -> Iterator[str]: ... + # Methods below here don't exist directly on the _wrap_close object, but + # are copied from the wrapped TextIOWrapper object via __getattr__. + # The full set of TextIOWrapper methods are technically available this way, + # but undocumented. Only a subset are currently included here. + def read(self, size: int | None = -1, /) -> str: ... + def readable(self) -> bool: ... + def readline(self, size: int = -1, /) -> str: ... + def readlines(self, hint: int = -1, /) -> list[str]: ... + def writable(self) -> bool: ... + def write(self, s: str, /) -> int: ... + def writelines(self, lines: Iterable[str], /) -> None: ... def popen(cmd: str, mode: str = "r", buffering: int = -1) -> _wrap_close: ... def spawnl(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: StrOrBytesPath) -> int: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/pickle.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/pickle.pyi index 98ec80b0f14e..9bea92ef1c9e 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/pickle.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/pickle.pyi @@ -157,10 +157,10 @@ class Pickler: def __init__( self, file: SupportsWrite[bytes], - protocol: int | None = ..., + protocol: int | None = None, *, - fix_imports: bool = ..., - buffer_callback: _BufferCallback = ..., + fix_imports: bool = True, + buffer_callback: _BufferCallback = None, ) -> None: ... def reducer_override(self, obj: Any) -> Any: ... def dump(self, obj: Any, /) -> None: ... @@ -174,10 +174,10 @@ class Unpickler: self, file: _ReadableFileobj, *, - fix_imports: bool = ..., - encoding: str = ..., - errors: str = ..., - buffers: Iterable[Any] | None = ..., + fix_imports: bool = True, + encoding: str = "ASCII", + errors: str = "strict", + buffers: Iterable[Any] | None = (), ) -> None: ... def load(self) -> Any: ... def find_class(self, module_name: str, global_name: str, /) -> Any: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/posixpath.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/posixpath.pyi index 31406f8df950..3313667f1781 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/posixpath.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/posixpath.pyi @@ -77,7 +77,11 @@ pathsep: LiteralString defpath: LiteralString devnull: LiteralString -def abspath(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ... +# Overloads are necessary to work around python/mypy#17952 & python/mypy#11880 +@overload +def abspath(path: PathLike[AnyStr]) -> AnyStr: ... +@overload +def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(p: PathLike[AnyStr]) -> AnyStr: ... @overload @@ -86,8 +90,14 @@ def basename(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ... def dirname(p: PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ... -def expanduser(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ... -def expandvars(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ... +@overload +def expanduser(path: PathLike[AnyStr]) -> AnyStr: ... +@overload +def expanduser(path: AnyStr) -> AnyStr: ... +@overload +def expandvars(path: PathLike[AnyStr]) -> AnyStr: ... +@overload +def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(s: PathLike[AnyStr]) -> AnyStr: ... @overload diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/re.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/re.pyi index ac297b7d4567..b8fe2e9e1a46 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/re.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/re.pyi @@ -2,7 +2,7 @@ import enum import sre_compile import sre_constants import sys -from _typeshed import ReadableBuffer +from _typeshed import MaybeNone, ReadableBuffer from collections.abc import Callable, Iterator, Mapping from typing import Any, AnyStr, Generic, Literal, TypeVar, final, overload from typing_extensions import TypeAlias @@ -90,19 +90,19 @@ class Match(Generic[AnyStr]): @overload def group(self, group: Literal[0] = 0, /) -> AnyStr: ... @overload - def group(self, group: str | int, /) -> AnyStr | Any: ... + def group(self, group: str | int, /) -> AnyStr | MaybeNone: ... @overload - def group(self, group1: str | int, group2: str | int, /, *groups: str | int) -> tuple[AnyStr | Any, ...]: ... + def group(self, group1: str | int, group2: str | int, /, *groups: str | int) -> tuple[AnyStr | MaybeNone, ...]: ... # Each item of groups()'s return tuple is either "AnyStr" or # "AnyStr | None", depending on the pattern. @overload - def groups(self) -> tuple[AnyStr | Any, ...]: ... + def groups(self) -> tuple[AnyStr | MaybeNone, ...]: ... @overload def groups(self, default: _T) -> tuple[AnyStr | _T, ...]: ... # Each value in groupdict()'s return dict is either "AnyStr" or # "AnyStr | None", depending on the pattern. @overload - def groupdict(self) -> dict[str, AnyStr | Any]: ... + def groupdict(self) -> dict[str, AnyStr | MaybeNone]: ... @overload def groupdict(self, default: _T) -> dict[str, AnyStr | _T]: ... def start(self, group: int | str = 0, /) -> int: ... @@ -114,7 +114,7 @@ class Match(Generic[AnyStr]): @overload def __getitem__(self, key: Literal[0], /) -> AnyStr: ... @overload - def __getitem__(self, key: int | str, /) -> AnyStr | Any: ... + def __getitem__(self, key: int | str, /) -> AnyStr | MaybeNone: ... def __copy__(self) -> Match[AnyStr]: ... def __deepcopy__(self, memo: Any, /) -> Match[AnyStr]: ... if sys.version_info >= (3, 9): @@ -151,11 +151,11 @@ class Pattern(Generic[AnyStr]): @overload def fullmatch(self, string: AnyStr, pos: int = 0, endpos: int = sys.maxsize) -> Match[AnyStr] | None: ... @overload - def split(self: Pattern[str], string: str, maxsplit: int = 0) -> list[str | Any]: ... + def split(self: Pattern[str], string: str, maxsplit: int = 0) -> list[str | MaybeNone]: ... @overload - def split(self: Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0) -> list[bytes | Any]: ... + def split(self: Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0) -> list[bytes | MaybeNone]: ... @overload - def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr | Any]: ... + def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr | MaybeNone]: ... # return type depends on the number of groups in the pattern @overload def findall(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]: ... @@ -270,11 +270,11 @@ def fullmatch(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) - @overload def fullmatch(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ... @overload -def split(pattern: str | Pattern[str], string: str, maxsplit: int = 0, flags: _FlagsType = 0) -> list[str | Any]: ... +def split(pattern: str | Pattern[str], string: str, maxsplit: int = 0, flags: _FlagsType = 0) -> list[str | MaybeNone]: ... @overload def split( pattern: bytes | Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0, flags: _FlagsType = 0 -) -> list[bytes | Any]: ... +) -> list[bytes | MaybeNone]: ... @overload def findall(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> list[Any]: ... @overload diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/shlex.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/shlex.pyi index daa8df439b26..1c27483782fb 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/shlex.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/shlex.pyi @@ -27,7 +27,7 @@ def join(split_command: Iterable[str]) -> str: ... def quote(s: str) -> str: ... # TODO: Make generic over infile once PEP 696 is implemented. -class shlex(Iterable[str]): +class shlex: commenters: str wordchars: str whitespace: str diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/sqlite3/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/sqlite3/__init__.pyi index 3c3e7c6e5b40..931e8d03cb75 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/sqlite3/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/sqlite3/__init__.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import ReadableBuffer, StrOrBytesPath, SupportsLenAndGetItem, Unused +from _typeshed import MaybeNone, ReadableBuffer, StrOrBytesPath, SupportsLenAndGetItem, Unused from collections.abc import Callable, Generator, Iterable, Iterator, Mapping, Sequence from sqlite3.dbapi2 import ( PARSE_COLNAMES as PARSE_COLNAMES, @@ -397,13 +397,13 @@ class Connection: self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None, / ) -> Literal[False]: ... -class Cursor(Iterator[Any]): +class Cursor: arraysize: int @property def connection(self) -> Connection: ... - # May be None, but using | Any instead to avoid slightly annoying false positives. + # May be None, but using `| MaybeNone` (`| Any`) instead to avoid slightly annoying false positives. @property - def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | Any: ... + def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | MaybeNone: ... @property def lastrowid(self) -> int | None: ... row_factory: Callable[[Cursor, Row], object] | None diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/subprocess.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/subprocess.pyi index 703a5012012c..fef35b56945a 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/subprocess.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/subprocess.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import ReadableBuffer, StrOrBytesPath +from _typeshed import MaybeNone, ReadableBuffer, StrOrBytesPath from collections.abc import Callable, Collection, Iterable, Mapping, Sequence from types import TracebackType from typing import IO, Any, AnyStr, Final, Generic, Literal, TypeVar, overload @@ -1848,7 +1848,7 @@ class Popen(Generic[AnyStr]): stdout: IO[AnyStr] | None stderr: IO[AnyStr] | None pid: int - returncode: int | Any + returncode: int | MaybeNone universal_newlines: bool if sys.version_info >= (3, 11): diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/__init__.pyi index 4d25a04f8eb7..5d3550ea62ab 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/__init__.pyi @@ -1,6 +1,6 @@ import _tkinter import sys -from _typeshed import Incomplete, StrEnum, StrOrBytesPath +from _typeshed import Incomplete, MaybeNone, StrEnum, StrOrBytesPath from collections.abc import Callable, Iterable, Mapping, Sequence from tkinter.constants import * from tkinter.font import _FontDescription @@ -509,7 +509,7 @@ class Misc: pad: _ScreenUnits = ..., uniform: str = ..., weight: int = ..., - ) -> _GridIndexInfo | Any: ... # can be None but annoying to check + ) -> _GridIndexInfo | MaybeNone: ... # can be None but annoying to check def grid_rowconfigure( self, index: int | str | list[int] | tuple[int, ...], @@ -519,7 +519,7 @@ class Misc: pad: _ScreenUnits = ..., uniform: str = ..., weight: int = ..., - ) -> _GridIndexInfo | Any: ... # can be None but annoying to check + ) -> _GridIndexInfo | MaybeNone: ... # can be None but annoying to check columnconfigure = grid_columnconfigure rowconfigure = grid_rowconfigure def grid_location(self, x: _ScreenUnits, y: _ScreenUnits) -> tuple[int, int]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/ttk.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/ttk.pyi index b851f478140a..dacef0620b22 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/ttk.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/tkinter/ttk.pyi @@ -1,6 +1,6 @@ import _tkinter import tkinter -from _typeshed import Incomplete +from _typeshed import Incomplete, MaybeNone from collections.abc import Callable from tkinter.font import _FontDescription from typing import Any, Literal, TypedDict, overload @@ -1156,7 +1156,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView): background: str = ..., font: _FontDescription = ..., image: tkinter._ImageSpec = ..., - ) -> _TreeviewTagDict | Any: ... # can be None but annoying to check + ) -> _TreeviewTagDict | MaybeNone: ... # can be None but annoying to check @overload def tag_has(self, tagname: str, item: None = None) -> tuple[str, ...]: ... @overload diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/traceback.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/traceback.pyi index 075c0f4b9de8..1c4a59de66aa 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/traceback.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/traceback.pyi @@ -231,7 +231,7 @@ class TracebackException: if sys.version_info >= (3, 11): def print(self, *, file: SupportsWrite[str] | None = None, chain: bool = True) -> None: ... -class FrameSummary(Iterable[Any]): +class FrameSummary: if sys.version_info >= (3, 11): def __init__( self, @@ -276,6 +276,8 @@ class FrameSummary(Iterable[Any]): def __getitem__(self, pos: Literal[3]) -> str | None: ... @overload def __getitem__(self, pos: int) -> Any: ... + @overload + def __getitem__(self, pos: slice) -> tuple[Any, ...]: ... def __iter__(self) -> Iterator[Any]: ... def __eq__(self, other: object) -> bool: ... def __len__(self) -> Literal[4]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/types.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/types.pyi index 0f6592a9883e..ebea6f22fb12 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/types.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/types.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import SupportsKeysAndGetItem +from _typeshed import MaybeNone, SupportsKeysAndGetItem from _typeshed.importlib import LoaderProtocol from collections.abc import ( AsyncGenerator, @@ -424,6 +424,8 @@ class MethodType: @property def __closure__(self) -> tuple[CellType, ...] | None: ... # inherited from the added function @property + def __code__(self) -> CodeType: ... # inherited from the added function + @property def __defaults__(self) -> tuple[Any, ...] | None: ... # inherited from the added function @property def __func__(self) -> Callable[..., Any]: ... @@ -526,9 +528,9 @@ class FrameType: def f_lasti(self) -> int: ... # see discussion in #6769: f_lineno *can* sometimes be None, # but you should probably file a bug report with CPython if you encounter it being None in the wild. - # An `int | None` annotation here causes too many false-positive errors. + # An `int | None` annotation here causes too many false-positive errors, so applying `int | Any`. @property - def f_lineno(self) -> int | Any: ... + def f_lineno(self) -> int | MaybeNone: ... @property def f_locals(self) -> dict[str, Any]: ... f_trace: Callable[[FrameType, str, Any], Any] | None diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/unittest/runner.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/unittest/runner.pyi index 46da85619d30..be546f42315e 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/unittest/runner.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/unittest/runner.pyi @@ -13,13 +13,14 @@ class _SupportsWriteAndFlush(SupportsWrite[str], SupportsFlush, Protocol): ... # All methods used by unittest.runner.TextTestResult's stream class _TextTestStream(_SupportsWriteAndFlush, Protocol): - def writeln(self, arg: str | None = None) -> str: ... + def writeln(self, arg: str | None = None, /) -> str: ... # _WritelnDecorator should have all the same attrs as its stream param. # But that's not feasible to do Generically # We can expand the attributes if requested class _WritelnDecorator(_TextTestStream): def __init__(self, stream: _TextTestStream) -> None: ... + def writeln(self, arg: str | None = None) -> str: ... def __getattr__(self, attr: str) -> Any: ... # Any attribute from the stream type passed to __init__ # These attributes are prevented by __getattr__ stream: Never diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/unittest/suite.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/unittest/suite.pyi index c10cbc75d7fd..ff583d0766a0 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/unittest/suite.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/unittest/suite.pyi @@ -5,7 +5,7 @@ from typing_extensions import TypeAlias _TestType: TypeAlias = unittest.case.TestCase | TestSuite -class BaseTestSuite(Iterable[_TestType]): +class BaseTestSuite: _tests: list[unittest.case.TestCase] _removed_tests: int def __init__(self, tests: Iterable[_TestType] = ()) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stdlib/weakref.pyi b/packages/pyright-internal/typeshed-fallback/stdlib/weakref.pyi index 1b74c4846b7c..853caf3e8abb 100644 --- a/packages/pyright-internal/typeshed-fallback/stdlib/weakref.pyi +++ b/packages/pyright-internal/typeshed-fallback/stdlib/weakref.pyi @@ -54,8 +54,8 @@ class ProxyType(Generic[_T]): # "weakproxy" def __getattr__(self, attr: str) -> Any: ... class ReferenceType(Generic[_T]): # "weakref" - __callback__: Callable[[ReferenceType[_T]], Any] - def __new__(cls, o: _T, callback: Callable[[ReferenceType[_T]], Any] | None = ..., /) -> Self: ... + __callback__: Callable[[Self], Any] + def __new__(cls, o: _T, callback: Callable[[Self], Any] | None = ..., /) -> Self: ... def __call__(self) -> _T | None: ... def __eq__(self, value: object, /) -> bool: ... def __hash__(self) -> int: ... @@ -126,8 +126,8 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]): class KeyedRef(ref[_T], Generic[_KT, _T]): key: _KT - def __new__(type, ob: _T, callback: Callable[[_T], Any], key: _KT) -> Self: ... - def __init__(self, ob: _T, callback: Callable[[_T], Any], key: _KT) -> None: ... + def __new__(type, ob: _T, callback: Callable[[Self], Any], key: _KT) -> Self: ... + def __init__(self, ob: _T, callback: Callable[[Self], Any], key: _KT) -> None: ... class WeakKeyDictionary(MutableMapping[_KT, _VT]): @overload diff --git a/packages/pyright-internal/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi b/packages/pyright-internal/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi index 6e9cf6d5f9ab..cf5d39a4d4ef 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi @@ -27,6 +27,7 @@ class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution): def __new__(cls, original_value): ... def encode(self, encoding: str) -> str: ... # type: ignore[override] # incompatible with str +_T = TypeVar("_T") _PageElementT = TypeVar("_PageElementT", bound=PageElement) _SimpleStrainable: TypeAlias = str | bool | None | bytes | Pattern[str] | Callable[[str], bool] | Callable[[Tag], bool] _Strainable: TypeAlias = _SimpleStrainable | Iterable[_SimpleStrainable] @@ -276,8 +277,16 @@ class Tag(PageElement): def clear(self, decompose: bool = False) -> None: ... def smooth(self) -> None: ... def index(self, element: PageElement) -> int: ... - def get(self, key: str, default: str | list[str] | None = None) -> str | list[str] | None: ... - def get_attribute_list(self, key: str, default: str | list[str] | None = None) -> list[str]: ... + @overload + def get(self, key: str, default: None = None) -> str | list[str] | None: ... + @overload + def get(self, key: str, default: _T) -> str | list[str] | _T: ... + @overload + def get_attribute_list(self, key: str, default: None = None) -> list[str | None]: ... + @overload + def get_attribute_list(self, key: str, default: list[_T]) -> list[str | _T]: ... + @overload + def get_attribute_list(self, key: str, default: _T) -> list[str | _T]: ... def has_attr(self, key: str) -> bool: ... def __hash__(self) -> int: ... def __getitem__(self, key: str) -> str | list[str]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/boto/METADATA.toml deleted file mode 100644 index 56aaba050a58..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/METADATA.toml +++ /dev/null @@ -1,7 +0,0 @@ -version = "2.49.*" -upstream_repository = "https://github.com/boto/boto" -requires = [] -partial_stub = true - -[tool.stubtest] -ignore_missing_stub = true diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/__init__.pyi deleted file mode 100644 index fc1738360079..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/__init__.pyi +++ /dev/null @@ -1,143 +0,0 @@ -import logging -from _typeshed import Incomplete -from typing import Any - -from .s3.connection import S3Connection - -Version: Any -UserAgent: Any -config: Any -BUCKET_NAME_RE: Any -TOO_LONG_DNS_NAME_COMP: Any -GENERATION_RE: Any -VERSION_RE: Any -ENDPOINTS_PATH: Any - -def init_logging(): ... - -class NullHandler(logging.Handler): - def emit(self, record): ... - -log: Any -perflog: Any - -def set_file_logger(name, filepath, level: Any = 20, format_string: Incomplete | None = None): ... -def set_stream_logger(name, level: Any = 10, format_string: Incomplete | None = None): ... -def connect_sqs(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_s3(aws_access_key_id: str | None = None, aws_secret_access_key: str | None = None, **kwargs) -> S3Connection: ... -def connect_gs(gs_access_key_id: Incomplete | None = None, gs_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_ec2(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_elb(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_autoscale(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_cloudwatch( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_sdb(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_fps(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_mturk(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_cloudfront( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_vpc(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_rds(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_rds2(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_emr(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_sns(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_iam(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_route53(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_cloudformation( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_euca( - host: Incomplete | None = None, - aws_access_key_id: Incomplete | None = None, - aws_secret_access_key: Incomplete | None = None, - port: int = 8773, - path: str = "/services/Eucalyptus", - is_secure: bool = False, - **kwargs, -): ... -def connect_glacier(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_ec2_endpoint( - url, aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_walrus( - host: Incomplete | None = None, - aws_access_key_id: Incomplete | None = None, - aws_secret_access_key: Incomplete | None = None, - port: int = 8773, - path: str = "/services/Walrus", - is_secure: bool = False, - **kwargs, -): ... -def connect_ses(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_sts(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_ia( - ia_access_key_id: Incomplete | None = None, ia_secret_access_key: Incomplete | None = None, is_secure: bool = False, **kwargs -): ... -def connect_dynamodb(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_swf(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_cloudsearch( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_cloudsearch2( - aws_access_key_id: Incomplete | None = None, - aws_secret_access_key: Incomplete | None = None, - sign_request: bool = False, - **kwargs, -): ... -def connect_cloudsearchdomain( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_beanstalk(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_elastictranscoder( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_opsworks(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_redshift(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_support(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_cloudtrail( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_directconnect( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_kinesis(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_logs(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_route53domains( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_cognito_identity( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_cognito_sync( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_kms(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_awslambda(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_codedeploy( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_configservice( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_cloudhsm(aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs): ... -def connect_ec2containerservice( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def connect_machinelearning( - aws_access_key_id: Incomplete | None = None, aws_secret_access_key: Incomplete | None = None, **kwargs -): ... -def storage_uri( - uri_str, - default_scheme: str = "file", - debug: int = 0, - validate: bool = True, - bucket_storage_uri_class: Any = ..., - suppress_consec_slashes: bool = True, - is_latest: bool = False, -): ... -def storage_uri_for_key(key): ... - -# Explicitly mark this package as incomplete. -def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth.pyi deleted file mode 100644 index 7af7cd902102..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth.pyi +++ /dev/null @@ -1,112 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from boto.auth_handler import AuthHandler - -SIGV4_DETECT: Any - -class HmacKeys: - host: Any - def __init__(self, host, config, provider) -> None: ... - def update_provider(self, provider): ... - def algorithm(self): ... - def sign_string(self, string_to_sign): ... - -class AnonAuthHandler(AuthHandler, HmacKeys): - capability: Any - def __init__(self, host, config, provider) -> None: ... - def add_auth(self, http_request, **kwargs): ... - -class HmacAuthV1Handler(AuthHandler, HmacKeys): - capability: Any - def __init__(self, host, config, provider) -> None: ... - def update_provider(self, provider): ... - def add_auth(self, http_request, **kwargs): ... - -class HmacAuthV2Handler(AuthHandler, HmacKeys): - capability: Any - def __init__(self, host, config, provider) -> None: ... - def update_provider(self, provider): ... - def add_auth(self, http_request, **kwargs): ... - -class HmacAuthV3Handler(AuthHandler, HmacKeys): - capability: Any - def __init__(self, host, config, provider) -> None: ... - def add_auth(self, http_request, **kwargs): ... - -class HmacAuthV3HTTPHandler(AuthHandler, HmacKeys): - capability: Any - def __init__(self, host, config, provider) -> None: ... - def headers_to_sign(self, http_request): ... - def canonical_headers(self, headers_to_sign): ... - def string_to_sign(self, http_request): ... - def add_auth(self, req, **kwargs): ... # type: ignore[override] - -class HmacAuthV4Handler(AuthHandler, HmacKeys): - capability: Any - service_name: Any - region_name: Any - def __init__( - self, host, config, provider, service_name: Incomplete | None = None, region_name: Incomplete | None = None - ) -> None: ... - def headers_to_sign(self, http_request): ... - def host_header(self, host, http_request): ... - def query_string(self, http_request): ... - def canonical_query_string(self, http_request): ... - def canonical_headers(self, headers_to_sign): ... - def signed_headers(self, headers_to_sign): ... - def canonical_uri(self, http_request): ... - def payload(self, http_request): ... - def canonical_request(self, http_request): ... - def scope(self, http_request): ... - def split_host_parts(self, host): ... - def determine_region_name(self, host): ... - def determine_service_name(self, host): ... - def credential_scope(self, http_request): ... - def string_to_sign(self, http_request, canonical_request): ... - def signature(self, http_request, string_to_sign): ... - def add_auth(self, req, **kwargs): ... # type: ignore[override] - -class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler): - capability: Any - region_name: Any - def __init__(self, *args, **kwargs) -> None: ... - def clean_region_name(self, region_name): ... - def canonical_uri(self, http_request): ... - def canonical_query_string(self, http_request): ... - def host_header(self, host, http_request): ... - def headers_to_sign(self, http_request): ... - def determine_region_name(self, host): ... - def determine_service_name(self, host): ... - def mangle_path_and_params(self, req): ... - def payload(self, http_request): ... - def add_auth(self, req, **kwargs): ... # type: ignore[override] - def presign(self, req, expires, iso_date: Incomplete | None = None): ... - -class STSAnonHandler(AuthHandler): - capability: Any - def add_auth(self, http_request, **kwargs): ... - -class QuerySignatureHelper(HmacKeys): - def add_auth(self, http_request, **kwargs): ... - -class QuerySignatureV0AuthHandler(QuerySignatureHelper, AuthHandler): - SignatureVersion: int - capability: Any - -class QuerySignatureV1AuthHandler(QuerySignatureHelper, AuthHandler): - SignatureVersion: int - capability: Any - def __init__(self, *args, **kw) -> None: ... - -class QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler): - SignatureVersion: int - capability: Any - -class POSTPathQSV2AuthHandler(QuerySignatureV2AuthHandler, AuthHandler): - capability: Any - def add_auth(self, req, **kwargs): ... # type: ignore[override] - -def get_auth_handler(host, config, provider, requested_capability: Incomplete | None = None): ... -def detect_potential_sigv4(func): ... -def detect_potential_s3sigv4(func): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth_handler.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth_handler.pyi deleted file mode 100644 index 7cc874bc8d79..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/auth_handler.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from typing import Any - -from boto.plugin import Plugin - -class NotReadyToAuthenticate(Exception): ... - -class AuthHandler(Plugin): - capability: Any - def __init__(self, host, config, provider) -> None: ... - def add_auth(self, http_request): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/compat.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/compat.pyi deleted file mode 100644 index 5f6e4cc51df4..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/compat.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from base64 import encodebytes as encodebytes -from typing import Any - -expanduser: Any -StandardError = Exception -long_type: Any -unquote_str: Any -parse_qs_safe: Any diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/connection.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/connection.pyi deleted file mode 100644 index 1fe485dea4fd..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/connection.pyi +++ /dev/null @@ -1,178 +0,0 @@ -import http.client -from _typeshed import Incomplete -from typing import Any - -HAVE_HTTPS_CONNECTION: bool -ON_APP_ENGINE: Any -PORTS_BY_SECURITY: Any -DEFAULT_CA_CERTS_FILE: Any - -class HostConnectionPool: - queue: Any - def __init__(self) -> None: ... - def size(self): ... - def put(self, conn): ... - def get(self): ... - def clean(self): ... - -class ConnectionPool: - CLEAN_INTERVAL: float - STALE_DURATION: float - host_to_pool: Any - last_clean_time: float - mutex: Any - def __init__(self) -> None: ... - def size(self): ... - def get_http_connection(self, host, port, is_secure): ... - def put_http_connection(self, host, port, is_secure, conn): ... - def clean(self): ... - -class HTTPRequest: - method: Any - protocol: Any - host: Any - port: Any - path: Any - auth_path: Any - params: Any - headers: Any - body: Any - def __init__(self, method, protocol, host, port, path, auth_path, params, headers, body) -> None: ... - def authorize(self, connection, **kwargs): ... - -class HTTPResponse(http.client.HTTPResponse): - def __init__(self, *args, **kwargs) -> None: ... - def read(self, amt: Incomplete | None = None): ... - -class AWSAuthConnection: - suppress_consec_slashes: Any - num_retries: int - is_secure: Any - https_validate_certificates: Any - ca_certificates_file: Any - port: Any - http_exceptions: Any - http_unretryable_exceptions: Any - socket_exception_values: Any - https_connection_factory: Any - protocol: str - host: Any - path: Any - debug: Any - host_header: Any - http_connection_kwargs: Any - provider: Any - auth_service_name: Any - request_hook: Any - def __init__( - self, - host, - aws_access_key_id: Incomplete | None = None, - aws_secret_access_key: Incomplete | None = None, - is_secure: bool = True, - port: Incomplete | None = None, - proxy: Incomplete | None = None, - proxy_port: Incomplete | None = None, - proxy_user: Incomplete | None = None, - proxy_pass: Incomplete | None = None, - debug: int = 0, - https_connection_factory: Incomplete | None = None, - path: str = "/", - provider: str = "aws", - security_token: Incomplete | None = None, - suppress_consec_slashes: bool = True, - validate_certs: bool = True, - profile_name: Incomplete | None = None, - ) -> None: ... - auth_region_name: Any - @property - def connection(self): ... - @property - def aws_access_key_id(self): ... - @property - def gs_access_key_id(self) -> Any: ... - @property - def access_key(self): ... - @property - def aws_secret_access_key(self): ... - @property - def gs_secret_access_key(self): ... - @property - def secret_key(self): ... - @property - def profile_name(self): ... - def get_path(self, path: str = "/"): ... - def server_name(self, port: Incomplete | None = None): ... - proxy: Any - proxy_port: Any - proxy_user: Any - proxy_pass: Any - no_proxy: Any - use_proxy: Any - def handle_proxy(self, proxy, proxy_port, proxy_user, proxy_pass): ... - def get_http_connection(self, host, port, is_secure): ... - def skip_proxy(self, host): ... - def new_http_connection(self, host, port, is_secure): ... - def put_http_connection(self, host, port, is_secure, connection): ... - def proxy_ssl(self, host: Incomplete | None = None, port: Incomplete | None = None): ... - def prefix_proxy_to_path(self, path, host: Incomplete | None = None): ... - def get_proxy_auth_header(self): ... - def get_proxy_url_with_auth(self): ... - def set_host_header(self, request): ... - def set_request_hook(self, hook): ... - def build_base_http_request( - self, - method, - path, - auth_path, - params: Incomplete | None = None, - headers: Incomplete | None = None, - data: str = "", - host: Incomplete | None = None, - ): ... - def make_request( - self, - method, - path, - headers: Incomplete | None = None, - data: str = "", - host: Incomplete | None = None, - auth_path: Incomplete | None = None, - sender: Incomplete | None = None, - override_num_retries: Incomplete | None = None, - params: Incomplete | None = None, - retry_handler: Incomplete | None = None, - ): ... - def close(self): ... - -class AWSQueryConnection(AWSAuthConnection): - APIVersion: str - ResponseError: Any - def __init__( - self, - aws_access_key_id: Incomplete | None = None, - aws_secret_access_key: Incomplete | None = None, - is_secure: bool = True, - port: Incomplete | None = None, - proxy: Incomplete | None = None, - proxy_port: Incomplete | None = None, - proxy_user: Incomplete | None = None, - proxy_pass: Incomplete | None = None, - host: Incomplete | None = None, - debug: int = 0, - https_connection_factory: Incomplete | None = None, - path: str = "/", - security_token: Incomplete | None = None, - validate_certs: bool = True, - profile_name: Incomplete | None = None, - provider: str = "aws", - ) -> None: ... - def get_utf8_value(self, value): ... - def make_request( # type: ignore[override] - self, action, params: Incomplete | None = None, path: str = "/", verb: str = "GET", *args, **kwargs - ): ... - def build_list_params(self, params, items, label): ... - def build_complex_list_params(self, params, items, label, names): ... - def get_list(self, action, params, markers, path: str = "/", parent: Incomplete | None = None, verb: str = "GET"): ... - def get_object(self, action, params, cls, path: str = "/", parent: Incomplete | None = None, verb: str = "GET"): ... - def get_status(self, action, params, path: str = "/", parent: Incomplete | None = None, verb: str = "GET"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/ec2/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/ec2/__init__.pyi deleted file mode 100644 index e21a2bfe4830..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/ec2/__init__.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -RegionData: Any - -def regions(**kw_params): ... -def connect_to_region(region_name, **kw_params): ... -def get_region(region_name, **kw_params): ... - -# Explicitly mark this package as incomplete. -def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/elb/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/elb/__init__.pyi deleted file mode 100644 index d2a79d5f0b46..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/elb/__init__.pyi +++ /dev/null @@ -1,59 +0,0 @@ -from typing import Any - -from boto.connection import AWSQueryConnection - -RegionData: Any - -def regions(): ... -def connect_to_region(region_name, **kw_params): ... - -class ELBConnection(AWSQueryConnection): - APIVersion: Any - DefaultRegionName: Any - DefaultRegionEndpoint: Any - region: Any - def __init__( - self, - aws_access_key_id=..., - aws_secret_access_key=..., - is_secure=..., - port=..., - proxy=..., - proxy_port=..., - proxy_user=..., - proxy_pass=..., - debug=..., - https_connection_factory=..., - region=..., - path=..., - security_token=..., - validate_certs=..., - profile_name=..., - ) -> None: ... - def build_list_params(self, params, items, label): ... - def get_all_load_balancers(self, load_balancer_names=..., marker=...): ... - def create_load_balancer( - self, name, zones, listeners=..., subnets=..., security_groups=..., scheme=..., complex_listeners=... - ): ... - def create_load_balancer_listeners(self, name, listeners=..., complex_listeners=...): ... - def delete_load_balancer(self, name): ... - def delete_load_balancer_listeners(self, name, ports): ... - def enable_availability_zones(self, load_balancer_name, zones_to_add): ... - def disable_availability_zones(self, load_balancer_name, zones_to_remove): ... - def modify_lb_attribute(self, load_balancer_name, attribute, value): ... - def get_all_lb_attributes(self, load_balancer_name): ... - def get_lb_attribute(self, load_balancer_name, attribute): ... - def register_instances(self, load_balancer_name, instances): ... - def deregister_instances(self, load_balancer_name, instances): ... - def describe_instance_health(self, load_balancer_name, instances=...): ... - def configure_health_check(self, name, health_check): ... - def set_lb_listener_SSL_certificate(self, lb_name, lb_port, ssl_certificate_id): ... - def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name): ... - def create_lb_cookie_stickiness_policy(self, cookie_expiration_period, lb_name, policy_name): ... - def create_lb_policy(self, lb_name, policy_name, policy_type, policy_attributes): ... - def delete_lb_policy(self, lb_name, policy_name): ... - def set_lb_policies_of_listener(self, lb_name, lb_port, policies): ... - def set_lb_policies_of_backend_server(self, lb_name, instance_port, policies): ... - def apply_security_groups_to_lb(self, name, security_groups): ... - def attach_lb_to_subnets(self, name, subnets): ... - def detach_lb_from_subnets(self, name, subnets): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/exception.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/exception.pyi deleted file mode 100644 index e031ed8c3de4..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/exception.pyi +++ /dev/null @@ -1,148 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from boto.compat import StandardError - -class BotoClientError(StandardError): - reason: Any - def __init__(self, reason, *args) -> None: ... - -class SDBPersistenceError(StandardError): ... -class StoragePermissionsError(BotoClientError): ... -class S3PermissionsError(StoragePermissionsError): ... -class GSPermissionsError(StoragePermissionsError): ... - -class BotoServerError(StandardError): - status: Any - reason: Any - body: Any - request_id: Any - error_code: Any - message: str - box_usage: Any - def __init__(self, status, reason, body: Incomplete | None = None, *args) -> None: ... - def __getattr__(self, name: str): ... - def __setattr__(self, name: str, value) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class ConsoleOutput: - parent: Any - instance_id: Any - timestamp: Any - comment: Any - output: Any - def __init__(self, parent: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class StorageCreateError(BotoServerError): - bucket: Any - def __init__(self, status, reason, body: Incomplete | None = None) -> None: ... - def endElement(self, name, value, connection): ... - -class S3CreateError(StorageCreateError): ... -class GSCreateError(StorageCreateError): ... -class StorageCopyError(BotoServerError): ... -class S3CopyError(StorageCopyError): ... -class GSCopyError(StorageCopyError): ... - -class SQSError(BotoServerError): - detail: Any - type: Any - def __init__(self, status, reason, body: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class SQSDecodeError(BotoClientError): - message: Any - def __init__(self, reason, message) -> None: ... - -class StorageResponseError(BotoServerError): - resource: Any - def __init__(self, status, reason, body: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class S3ResponseError(StorageResponseError): ... -class GSResponseError(StorageResponseError): ... - -class EC2ResponseError(BotoServerError): - errors: Any - def __init__(self, status, reason, body: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - request_id: Any - def endElement(self, name, value, connection): ... - -class JSONResponseError(BotoServerError): - status: Any - reason: Any - body: Any - error_message: Any - error_code: Any - def __init__(self, status, reason, body: Incomplete | None = None, *args) -> None: ... - -class DynamoDBResponseError(JSONResponseError): ... -class SWFResponseError(JSONResponseError): ... -class EmrResponseError(BotoServerError): ... - -class _EC2Error: - connection: Any - error_code: Any - error_message: Any - def __init__(self, connection: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class SDBResponseError(BotoServerError): ... -class AWSConnectionError(BotoClientError): ... -class StorageDataError(BotoClientError): ... -class S3DataError(StorageDataError): ... -class GSDataError(StorageDataError): ... - -class InvalidUriError(Exception): - message: Any - def __init__(self, message) -> None: ... - -class InvalidAclError(Exception): - message: Any - def __init__(self, message) -> None: ... - -class InvalidCorsError(Exception): - message: Any - def __init__(self, message) -> None: ... - -class NoAuthHandlerFound(Exception): ... - -class InvalidLifecycleConfigError(Exception): - message: Any - def __init__(self, message) -> None: ... - -class ResumableTransferDisposition: - START_OVER: str - WAIT_BEFORE_RETRY: str - ABORT_CUR_PROCESS: str - ABORT: str - -class ResumableUploadException(Exception): - message: Any - disposition: Any - def __init__(self, message, disposition) -> None: ... - -class ResumableDownloadException(Exception): - message: Any - disposition: Any - def __init__(self, message, disposition) -> None: ... - -class TooManyRecordsException(Exception): - message: Any - def __init__(self, message) -> None: ... - -class PleaseRetryException(Exception): - message: Any - response: Any - def __init__(self, message, response: Incomplete | None = None) -> None: ... - -class InvalidInstanceMetadataError(Exception): - MSG: str - def __init__(self, msg) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/__init__.pyi deleted file mode 100644 index 9fc301120e0e..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -import boto.regioninfo - -def regions() -> list[boto.regioninfo.RegionInfo]: ... -def connect_to_region(region_name, **kw_params): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/exceptions.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/exceptions.pyi deleted file mode 100644 index 5ac2ecd2061f..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/exceptions.pyi +++ /dev/null @@ -1,17 +0,0 @@ -from boto.exception import BotoServerError - -class InvalidGrantTokenException(BotoServerError): ... -class DisabledException(BotoServerError): ... -class LimitExceededException(BotoServerError): ... -class DependencyTimeoutException(BotoServerError): ... -class InvalidMarkerException(BotoServerError): ... -class AlreadyExistsException(BotoServerError): ... -class InvalidCiphertextException(BotoServerError): ... -class KeyUnavailableException(BotoServerError): ... -class InvalidAliasNameException(BotoServerError): ... -class UnsupportedOperationException(BotoServerError): ... -class InvalidArnException(BotoServerError): ... -class KMSInternalException(BotoServerError): ... -class InvalidKeyUsageException(BotoServerError): ... -class MalformedPolicyDocumentException(BotoServerError): ... -class NotFoundException(BotoServerError): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/layer1.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/layer1.pyi deleted file mode 100644 index 8f5ca4f0d5c3..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/kms/layer1.pyi +++ /dev/null @@ -1,78 +0,0 @@ -from collections.abc import Mapping -from typing import Any - -from boto.connection import AWSQueryConnection - -class KMSConnection(AWSQueryConnection): - APIVersion: str - DefaultRegionName: str - DefaultRegionEndpoint: str - ServiceName: str - TargetPrefix: str - ResponseError: type[Exception] - region: Any - def __init__(self, **kwargs) -> None: ... - def create_alias(self, alias_name: str, target_key_id: str) -> dict[str, Any] | None: ... - def create_grant( - self, - key_id: str, - grantee_principal: str, - retiring_principal: str | None = None, - operations: list[str] | None = None, - constraints: dict[str, dict[str, str]] | None = None, - grant_tokens: list[str] | None = None, - ) -> dict[str, Any] | None: ... - def create_key( - self, policy: str | None = None, description: str | None = None, key_usage: str | None = None - ) -> dict[str, Any] | None: ... - def decrypt( - self, ciphertext_blob: bytes, encryption_context: Mapping[str, Any] | None = None, grant_tokens: list[str] | None = None - ) -> dict[str, Any] | None: ... - def delete_alias(self, alias_name: str) -> dict[str, Any] | None: ... - def describe_key(self, key_id: str) -> dict[str, Any] | None: ... - def disable_key(self, key_id: str) -> dict[str, Any] | None: ... - def disable_key_rotation(self, key_id: str) -> dict[str, Any] | None: ... - def enable_key(self, key_id: str) -> dict[str, Any] | None: ... - def enable_key_rotation(self, key_id: str) -> dict[str, Any] | None: ... - def encrypt( - self, - key_id: str, - plaintext: bytes, - encryption_context: Mapping[str, Any] | None = None, - grant_tokens: list[str] | None = None, - ) -> dict[str, Any] | None: ... - def generate_data_key( - self, - key_id: str, - encryption_context: Mapping[str, Any] | None = None, - number_of_bytes: int | None = None, - key_spec: str | None = None, - grant_tokens: list[str] | None = None, - ) -> dict[str, Any] | None: ... - def generate_data_key_without_plaintext( - self, - key_id: str, - encryption_context: Mapping[str, Any] | None = None, - key_spec: str | None = None, - number_of_bytes: int | None = None, - grant_tokens: list[str] | None = None, - ) -> dict[str, Any] | None: ... - def generate_random(self, number_of_bytes: int | None = None) -> dict[str, Any] | None: ... - def get_key_policy(self, key_id: str, policy_name: str) -> dict[str, Any] | None: ... - def get_key_rotation_status(self, key_id: str) -> dict[str, Any] | None: ... - def list_aliases(self, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ... - def list_grants(self, key_id: str, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ... - def list_key_policies(self, key_id: str, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ... - def list_keys(self, limit: int | None = None, marker: str | None = None) -> dict[str, Any] | None: ... - def put_key_policy(self, key_id: str, policy_name: str, policy: str) -> dict[str, Any] | None: ... - def re_encrypt( - self, - ciphertext_blob: bytes, - destination_key_id: str, - source_encryption_context: Mapping[str, Any] | None = None, - destination_encryption_context: Mapping[str, Any] | None = None, - grant_tokens: list[str] | None = None, - ) -> dict[str, Any] | None: ... - def retire_grant(self, grant_token: str) -> dict[str, Any] | None: ... - def revoke_grant(self, key_id: str, grant_id: str) -> dict[str, Any] | None: ... - def update_key_description(self, key_id: str, description: str) -> dict[str, Any] | None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/plugin.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/plugin.pyi deleted file mode 100644 index 0bcaad3c7c05..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/plugin.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class Plugin: - capability: Any - @classmethod - def is_capable(cls, requested_capability): ... - -def get_plugin(cls, requested_capability: Incomplete | None = None): ... -def load_plugins(config): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/regioninfo.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/regioninfo.pyi deleted file mode 100644 index b121a32402eb..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/regioninfo.pyi +++ /dev/null @@ -1,23 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def load_endpoint_json(path): ... -def merge_endpoints(defaults, additions): ... -def load_regions(): ... -def get_regions(service_name, region_cls: Incomplete | None = None, connection_cls: Incomplete | None = None): ... - -class RegionInfo: - connection: Any - name: Any - endpoint: Any - connection_cls: Any - def __init__( - self, - connection: Incomplete | None = None, - name: Incomplete | None = None, - endpoint: Incomplete | None = None, - connection_cls: Incomplete | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def connect(self, **kw_params): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/__init__.pyi deleted file mode 100644 index c2ceb4b76629..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/__init__.pyi +++ /dev/null @@ -1,16 +0,0 @@ -from boto.connection import AWSAuthConnection -from boto.regioninfo import RegionInfo - -from .connection import S3Connection - -class S3RegionInfo(RegionInfo): - def connect( - self, - name: str | None = ..., - endpoint: str | None = ..., - connection_cls: type[AWSAuthConnection] | None = ..., - **kw_params, - ) -> S3Connection: ... - -def regions() -> list[S3RegionInfo]: ... -def connect_to_region(region_name: str, **kw_params): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/acl.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/acl.pyi deleted file mode 100644 index ed969fda0077..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/acl.pyi +++ /dev/null @@ -1,49 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from .connection import S3Connection -from .user import User - -CannedACLStrings: list[str] - -class Policy: - parent: Any - namespace: Any - acl: ACL - def __init__(self, parent: Incomplete | None = None) -> None: ... - owner: User - def startElement(self, name: str, attrs: dict[str, Any], connection: S3Connection) -> None | User | ACL: ... - def endElement(self, name: str, value: Any, connection: S3Connection) -> None: ... - def to_xml(self) -> str: ... - -class ACL: - policy: Policy - grants: list[Grant] - def __init__(self, policy: Policy | None = None) -> None: ... - def add_grant(self, grant: Grant) -> None: ... - def add_email_grant(self, permission: str, email_address: str) -> None: ... - def add_user_grant(self, permission: str, user_id: str, display_name: str | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name: str, value: Any, connection: S3Connection) -> None: ... - def to_xml(self) -> str: ... - -class Grant: - NameSpace: str - permission: str - id: str - display_name: str - uri: str - email_address: str - type: str - def __init__( - self, - permission: str | None = None, - type: str | None = None, - id: str | None = None, - display_name: str | None = None, - uri: str | None = None, - email_address: str | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name: str, value: Any, connection: S3Connection) -> None: ... - def to_xml(self) -> str: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucket.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucket.pyi deleted file mode 100644 index 05e25b428271..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucket.pyi +++ /dev/null @@ -1,192 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from .bucketlistresultset import BucketListResultSet -from .connection import S3Connection -from .key import Key - -class S3WebsiteEndpointTranslate: - trans_region: dict[str, str] - @classmethod - def translate_region(cls, reg: str) -> str: ... - -S3Permissions: list[str] - -class Bucket: - LoggingGroup: str - BucketPaymentBody: str - VersioningBody: str - VersionRE: str - MFADeleteRE: str - name: str - connection: S3Connection - key_class: type[Key] - def __init__(self, connection: S3Connection | None = None, name: str | None = None, key_class: type[Key] = ...) -> None: ... - def __iter__(self): ... - def __contains__(self, key_name) -> bool: ... - def startElement(self, name, attrs, connection): ... - creation_date: Any - def endElement(self, name, value, connection): ... - def set_key_class(self, key_class): ... - def lookup(self, key_name, headers: dict[str, str] | None = None): ... - def get_key( - self, - key_name, - headers: dict[str, str] | None = None, - version_id: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - validate: bool = True, - ) -> Key: ... - def list( - self, - prefix: str = "", - delimiter: str = "", - marker: str = "", - headers: dict[str, str] | None = None, - encoding_type: Incomplete | None = None, - ) -> BucketListResultSet: ... - def list_versions( - self, - prefix: str = "", - delimiter: str = "", - key_marker: str = "", - version_id_marker: str = "", - headers: dict[str, str] | None = None, - encoding_type: str | None = None, - ) -> BucketListResultSet: ... - def list_multipart_uploads( - self, - key_marker: str = "", - upload_id_marker: str = "", - headers: dict[str, str] | None = None, - encoding_type: Incomplete | None = None, - ): ... - def validate_kwarg_names(self, kwargs, names): ... - def get_all_keys(self, headers: dict[str, str] | None = None, **params): ... - def get_all_versions(self, headers: dict[str, str] | None = None, **params): ... - def validate_get_all_versions_params(self, params): ... - def get_all_multipart_uploads(self, headers: dict[str, str] | None = None, **params): ... - def new_key(self, key_name: Incomplete | None = None): ... - def generate_url( - self, - expires_in, - method: str = "GET", - headers: dict[str, str] | None = None, - force_http: bool = False, - response_headers: dict[str, str] | None = None, - expires_in_absolute: bool = False, - ): ... - def delete_keys( - self, keys, quiet: bool = False, mfa_token: Incomplete | None = None, headers: dict[str, str] | None = None - ): ... - def delete_key( - self, - key_name, - headers: dict[str, str] | None = None, - version_id: Incomplete | None = None, - mfa_token: Incomplete | None = None, - ): ... - def copy_key( - self, - new_key_name, - src_bucket_name, - src_key_name, - metadata: Incomplete | None = None, - src_version_id: Incomplete | None = None, - storage_class: str = "STANDARD", - preserve_acl: bool = False, - encrypt_key: bool = False, - headers: dict[str, str] | None = None, - query_args: Incomplete | None = None, - ): ... - def set_canned_acl( - self, acl_str, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None - ): ... - def get_xml_acl(self, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None): ... - def set_xml_acl( - self, - acl_str, - key_name: str = "", - headers: dict[str, str] | None = None, - version_id: Incomplete | None = None, - query_args: str = "acl", - ): ... - def set_acl( - self, acl_or_str, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None - ): ... - def get_acl(self, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None): ... - def set_subresource( - self, subresource, value, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None - ): ... - def get_subresource( - self, subresource, key_name: str = "", headers: dict[str, str] | None = None, version_id: Incomplete | None = None - ): ... - def make_public(self, recursive: bool = False, headers: dict[str, str] | None = None): ... - def add_email_grant(self, permission, email_address, recursive: bool = False, headers: dict[str, str] | None = None): ... - def add_user_grant( - self, - permission, - user_id, - recursive: bool = False, - headers: dict[str, str] | None = None, - display_name: Incomplete | None = None, - ): ... - def list_grants(self, headers: dict[str, str] | None = None): ... - def get_location(self): ... - def set_xml_logging(self, logging_str, headers: dict[str, str] | None = None): ... - def enable_logging( - self, target_bucket, target_prefix: str = "", grants: Incomplete | None = None, headers: dict[str, str] | None = None - ): ... - def disable_logging(self, headers: dict[str, str] | None = None): ... - def get_logging_status(self, headers: dict[str, str] | None = None): ... - def set_as_logging_target(self, headers: dict[str, str] | None = None): ... - def get_request_payment(self, headers: dict[str, str] | None = None): ... - def set_request_payment(self, payer: str = "BucketOwner", headers: dict[str, str] | None = None): ... - def configure_versioning( - self, versioning, mfa_delete: bool = False, mfa_token: Incomplete | None = None, headers: dict[str, str] | None = None - ): ... - def get_versioning_status(self, headers: dict[str, str] | None = None): ... - def configure_lifecycle(self, lifecycle_config, headers: dict[str, str] | None = None): ... - def get_lifecycle_config(self, headers: dict[str, str] | None = None): ... - def delete_lifecycle_configuration(self, headers: dict[str, str] | None = None): ... - def configure_website( - self, - suffix: Incomplete | None = None, - error_key: Incomplete | None = None, - redirect_all_requests_to: Incomplete | None = None, - routing_rules: Incomplete | None = None, - headers: dict[str, str] | None = None, - ): ... - def set_website_configuration(self, config, headers: dict[str, str] | None = None): ... - def set_website_configuration_xml(self, xml, headers: dict[str, str] | None = None): ... - def get_website_configuration(self, headers: dict[str, str] | None = None): ... - def get_website_configuration_obj(self, headers: dict[str, str] | None = None): ... - def get_website_configuration_with_xml(self, headers: dict[str, str] | None = None): ... - def get_website_configuration_xml(self, headers: dict[str, str] | None = None): ... - def delete_website_configuration(self, headers: dict[str, str] | None = None): ... - def get_website_endpoint(self): ... - def get_policy(self, headers: dict[str, str] | None = None): ... - def set_policy(self, policy, headers: dict[str, str] | None = None): ... - def delete_policy(self, headers: dict[str, str] | None = None): ... - def set_cors_xml(self, cors_xml, headers: dict[str, str] | None = None): ... - def set_cors(self, cors_config, headers: dict[str, str] | None = None): ... - def get_cors_xml(self, headers: dict[str, str] | None = None): ... - def get_cors(self, headers: dict[str, str] | None = None): ... - def delete_cors(self, headers: dict[str, str] | None = None): ... - def initiate_multipart_upload( - self, - key_name, - headers: dict[str, str] | None = None, - reduced_redundancy: bool = False, - metadata: Incomplete | None = None, - encrypt_key: bool = False, - policy: Incomplete | None = None, - ): ... - def complete_multipart_upload(self, key_name, upload_id, xml_body, headers: dict[str, str] | None = None): ... - def cancel_multipart_upload(self, key_name, upload_id, headers: dict[str, str] | None = None): ... - def delete(self, headers: dict[str, str] | None = None): ... - def get_tags(self): ... - def get_xml_tags(self): ... - def set_xml_tags(self, tag_str, headers: dict[str, str] | None = None, query_args: str = "tagging"): ... - def set_tags(self, tags, headers: dict[str, str] | None = None): ... - def delete_tags(self, headers: dict[str, str] | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlistresultset.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlistresultset.pyi deleted file mode 100644 index c9781a5e6550..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlistresultset.pyi +++ /dev/null @@ -1,86 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Iterable, Iterator -from typing import Any - -from .key import Key - -def bucket_lister( - bucket, - prefix: str = "", - delimiter: str = "", - marker: str = "", - headers: Incomplete | None = None, - encoding_type: Incomplete | None = None, -): ... - -class BucketListResultSet(Iterable[Key]): - bucket: Any - prefix: Any - delimiter: Any - marker: Any - headers: Any - encoding_type: Any - def __init__( - self, - bucket: Incomplete | None = None, - prefix: str = "", - delimiter: str = "", - marker: str = "", - headers: Incomplete | None = None, - encoding_type: Incomplete | None = None, - ) -> None: ... - def __iter__(self) -> Iterator[Key]: ... - -def versioned_bucket_lister( - bucket, - prefix: str = "", - delimiter: str = "", - key_marker: str = "", - version_id_marker: str = "", - headers: Incomplete | None = None, - encoding_type: Incomplete | None = None, -): ... - -class VersionedBucketListResultSet: - bucket: Any - prefix: Any - delimiter: Any - key_marker: Any - version_id_marker: Any - headers: Any - encoding_type: Any - def __init__( - self, - bucket: Incomplete | None = None, - prefix: str = "", - delimiter: str = "", - key_marker: str = "", - version_id_marker: str = "", - headers: Incomplete | None = None, - encoding_type: Incomplete | None = None, - ) -> None: ... - def __iter__(self) -> Iterator[Key]: ... - -def multipart_upload_lister( - bucket, - key_marker: str = "", - upload_id_marker: str = "", - headers: Incomplete | None = None, - encoding_type: Incomplete | None = None, -): ... - -class MultiPartUploadListResultSet: - bucket: Any - key_marker: Any - upload_id_marker: Any - headers: Any - encoding_type: Any - def __init__( - self, - bucket: Incomplete | None = None, - key_marker: str = "", - upload_id_marker: str = "", - headers: Incomplete | None = None, - encoding_type: Incomplete | None = None, - ) -> None: ... - def __iter__(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlogging.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlogging.pyi deleted file mode 100644 index e9e5297fc628..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/bucketlogging.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class BucketLogging: - target: Any - prefix: Any - grants: Any - def __init__( - self, target: Incomplete | None = None, prefix: Incomplete | None = None, grants: Incomplete | None = None - ) -> None: ... - def add_grant(self, grant): ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/connection.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/connection.pyi deleted file mode 100644 index bbec849f03ef..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/connection.pyi +++ /dev/null @@ -1,142 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -from boto.connection import AWSAuthConnection -from boto.exception import BotoClientError - -from .bucket import Bucket - -def check_lowercase_bucketname(n): ... -def assert_case_insensitive(f): ... - -class _CallingFormat: - def get_bucket_server(self, server, bucket): ... - def build_url_base(self, connection, protocol, server, bucket, key: str = ""): ... - def build_host(self, server, bucket): ... - def build_auth_path(self, bucket, key: str = ""): ... - def build_path_base(self, bucket, key: str = ""): ... - -class SubdomainCallingFormat(_CallingFormat): - def get_bucket_server(self, server, bucket): ... - -class VHostCallingFormat(_CallingFormat): - def get_bucket_server(self, server, bucket): ... - -class OrdinaryCallingFormat(_CallingFormat): - def get_bucket_server(self, server, bucket): ... - def build_path_base(self, bucket, key: str = ""): ... - -class ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat): - def build_url_base(self, connection, protocol, server, bucket, key: str = ""): ... - -class Location: - DEFAULT: str - EU: str - EUCentral1: str - USWest: str - USWest2: str - SAEast: str - APNortheast: str - APSoutheast: str - APSoutheast2: str - CNNorth1: str - -class NoHostProvided: ... -class HostRequiredError(BotoClientError): ... - -class S3Connection(AWSAuthConnection): - DefaultHost: Any - DefaultCallingFormat: Any - QueryString: str - calling_format: Any - bucket_class: type[Bucket] - anon: Any - def __init__( - self, - aws_access_key_id: Incomplete | None = None, - aws_secret_access_key: Incomplete | None = None, - is_secure: bool = True, - port: Incomplete | None = None, - proxy: Incomplete | None = None, - proxy_port: Incomplete | None = None, - proxy_user: Incomplete | None = None, - proxy_pass: Incomplete | None = None, - host: Any = ..., - debug: int = 0, - https_connection_factory: Incomplete | None = None, - calling_format: Any = "boto.s3.connection.SubdomainCallingFormat", - path: str = "/", - provider: str = "aws", - bucket_class: type[Bucket] = ..., - security_token: Incomplete | None = None, - suppress_consec_slashes: bool = True, - anon: bool = False, - validate_certs: Incomplete | None = None, - profile_name: Incomplete | None = None, - ) -> None: ... - def __iter__(self): ... - def __contains__(self, bucket_name): ... - def set_bucket_class(self, bucket_class: type[Bucket]) -> None: ... - def build_post_policy(self, expiration_time, conditions): ... - def build_post_form_args( - self, - bucket_name, - key, - expires_in: int = 6000, - acl: Incomplete | None = None, - success_action_redirect: Incomplete | None = None, - max_content_length: Incomplete | None = None, - http_method: str = "http", - fields: Incomplete | None = None, - conditions: Incomplete | None = None, - storage_class: str = "STANDARD", - server_side_encryption: Incomplete | None = None, - ): ... - def generate_url_sigv4( - self, - expires_in, - method, - bucket: str = "", - key: str = "", - headers: dict[str, str] | None = None, - force_http: bool = False, - response_headers: dict[str, str] | None = None, - version_id: Incomplete | None = None, - iso_date: Incomplete | None = None, - ): ... - def generate_url( - self, - expires_in, - method, - bucket: str = "", - key: str = "", - headers: dict[str, str] | None = None, - query_auth: bool = True, - force_http: bool = False, - response_headers: dict[str, str] | None = None, - expires_in_absolute: bool = False, - version_id: Incomplete | None = None, - ): ... - def get_all_buckets(self, headers: dict[str, str] | None = None): ... - def get_canonical_user_id(self, headers: dict[str, str] | None = None): ... - def get_bucket(self, bucket_name: str, validate: bool = True, headers: dict[str, str] | None = None) -> Bucket: ... - def head_bucket(self, bucket_name, headers: dict[str, str] | None = None): ... - def lookup(self, bucket_name, validate: bool = True, headers: dict[str, str] | None = None): ... - def create_bucket( - self, bucket_name, headers: dict[str, str] | None = None, location: Any = "", policy: Incomplete | None = None - ): ... - def delete_bucket(self, bucket, headers: dict[str, str] | None = None): ... - def make_request( # type: ignore[override] - self, - method, - bucket: str = "", - key: str = "", - headers: Incomplete | None = None, - data: str = "", - query_args: Incomplete | None = None, - sender: Incomplete | None = None, - override_num_retries: Incomplete | None = None, - retry_handler: Incomplete | None = None, - *args, - **kwargs, - ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/cors.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/cors.pyi deleted file mode 100644 index f497246be868..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/cors.pyi +++ /dev/null @@ -1,36 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class CORSRule: - allowed_method: Any - allowed_origin: Any - id: Any - allowed_header: Any - max_age_seconds: Any - expose_header: Any - def __init__( - self, - allowed_method: Incomplete | None = None, - allowed_origin: Incomplete | None = None, - id: Incomplete | None = None, - allowed_header: Incomplete | None = None, - max_age_seconds: Incomplete | None = None, - expose_header: Incomplete | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self) -> str: ... - -class CORSConfiguration(list[CORSRule]): - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self) -> str: ... - def add_rule( - self, - allowed_method, - allowed_origin, - id: Incomplete | None = None, - allowed_header: Incomplete | None = None, - max_age_seconds: Incomplete | None = None, - expose_header: Incomplete | None = None, - ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/deletemarker.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/deletemarker.pyi deleted file mode 100644 index 38fe39bfdeb7..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/deletemarker.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class DeleteMarker: - bucket: Any - name: Any - version_id: Any - is_latest: bool - last_modified: Any - owner: Any - def __init__(self, bucket: Incomplete | None = None, name: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/key.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/key.pyi deleted file mode 100644 index 227403367b96..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/key.pyi +++ /dev/null @@ -1,235 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Callable -from typing import Any, overload - -class Key: - DefaultContentType: str - RestoreBody: str - BufferSize: Any - base_user_settable_fields: Any - base_fields: Any - bucket: Any - name: str - metadata: Any - cache_control: Any - content_type: Any - content_encoding: Any - content_disposition: Any - content_language: Any - filename: Any - etag: Any - is_latest: bool - last_modified: Any - owner: Any - path: Any - resp: Any - mode: Any - size: Any - version_id: Any - source_version_id: Any - delete_marker: bool - encrypted: Any - ongoing_restore: Any - expiry_date: Any - local_hashes: Any - def __init__(self, bucket: Incomplete | None = None, name: Incomplete | None = None) -> None: ... - def __iter__(self): ... - @property - def provider(self): ... - key: Any - md5: Any - base64md5: Any - storage_class: Any - def get_md5_from_hexdigest(self, md5_hexdigest): ... - def handle_encryption_headers(self, resp): ... - def handle_version_headers(self, resp, force: bool = False): ... - def handle_restore_headers(self, response): ... - def handle_addl_headers(self, headers): ... - def open_read( - self, - headers: dict[str, str] | None = None, - query_args: str = "", - override_num_retries: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - ): ... - def open_write(self, headers: dict[str, str] | None = None, override_num_retries: Incomplete | None = None): ... - def open( - self, - mode: str = "r", - headers: dict[str, str] | None = None, - query_args: Incomplete | None = None, - override_num_retries: Incomplete | None = None, - ): ... - closed: bool - def close(self, fast: bool = False): ... - def next(self): ... - __next__: Any - def read(self, size: int = 0): ... - def change_storage_class(self, new_storage_class, dst_bucket: Incomplete | None = None, validate_dst_bucket: bool = True): ... - def copy( - self, - dst_bucket, - dst_key, - metadata: Incomplete | None = None, - reduced_redundancy: bool = False, - preserve_acl: bool = False, - encrypt_key: bool = False, - validate_dst_bucket: bool = True, - ): ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def exists(self, headers: dict[str, str] | None = None): ... - def delete(self, headers: dict[str, str] | None = None): ... - def get_metadata(self, name): ... - def set_metadata(self, name, value): ... - def update_metadata(self, d): ... - def set_acl(self, acl_str, headers: dict[str, str] | None = None): ... - def get_acl(self, headers: dict[str, str] | None = None): ... - def get_xml_acl(self, headers: dict[str, str] | None = None): ... - def set_xml_acl(self, acl_str, headers: dict[str, str] | None = None): ... - def set_canned_acl(self, acl_str, headers: dict[str, str] | None = None): ... - def get_redirect(self): ... - def set_redirect(self, redirect_location, headers: dict[str, str] | None = None): ... - def make_public(self, headers: dict[str, str] | None = None): ... - def generate_url( - self, - expires_in, - method: str = "GET", - headers: dict[str, str] | None = None, - query_auth: bool = True, - force_http: bool = False, - response_headers: dict[str, str] | None = None, - expires_in_absolute: bool = False, - version_id: Incomplete | None = None, - policy: Incomplete | None = None, - reduced_redundancy: bool = False, - encrypt_key: bool = False, - ): ... - def send_file( - self, - fp, - headers: dict[str, str] | None = None, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - query_args: Incomplete | None = None, - chunked_transfer: bool = False, - size: Incomplete | None = None, - ): ... - def should_retry(self, response, chunked_transfer: bool = False): ... - def compute_md5(self, fp, size: Incomplete | None = None): ... - def set_contents_from_stream( - self, - fp, - headers: dict[str, str] | None = None, - replace: bool = True, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - policy: Incomplete | None = None, - reduced_redundancy: bool = False, - query_args: Incomplete | None = None, - size: Incomplete | None = None, - ): ... - def set_contents_from_file( - self, - fp, - headers: dict[str, str] | None = None, - replace: bool = True, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - policy: Incomplete | None = None, - md5: Incomplete | None = None, - reduced_redundancy: bool = False, - query_args: Incomplete | None = None, - encrypt_key: bool = False, - size: Incomplete | None = None, - rewind: bool = False, - ): ... - def set_contents_from_filename( - self, - filename, - headers: dict[str, str] | None = None, - replace: bool = True, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - policy: Incomplete | None = None, - md5: Incomplete | None = None, - reduced_redundancy: bool = False, - encrypt_key: bool = False, - ): ... - def set_contents_from_string( - self, - string_data: str | bytes, - headers: dict[str, str] | None = None, - replace: bool = True, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - policy: Incomplete | None = None, - md5: Incomplete | None = None, - reduced_redundancy: bool = False, - encrypt_key: bool = False, - ) -> None: ... - def get_file( - self, - fp, - headers: dict[str, str] | None = None, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - torrent: bool = False, - version_id: Incomplete | None = None, - override_num_retries: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - ): ... - def get_torrent_file( - self, fp, headers: dict[str, str] | None = None, cb: Callable[[int, int], object] | None = None, num_cb: int = 10 - ): ... - def get_contents_to_file( - self, - fp, - headers: dict[str, str] | None = None, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - torrent: bool = False, - version_id: Incomplete | None = None, - res_download_handler: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - ): ... - def get_contents_to_filename( - self, - filename, - headers: dict[str, str] | None = None, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - torrent: bool = False, - version_id: Incomplete | None = None, - res_download_handler: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - ): ... - @overload - def get_contents_as_string( - self, - headers: dict[str, str] | None = None, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - torrent: bool = False, - version_id: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - encoding: None = None, - ) -> bytes: ... - @overload - def get_contents_as_string( - self, - headers: dict[str, str] | None = None, - cb: Callable[[int, int], object] | None = None, - num_cb: int = 10, - torrent: bool = False, - version_id: Incomplete | None = None, - response_headers: dict[str, str] | None = None, - *, - encoding: str, - ) -> str: ... - def add_email_grant(self, permission, email_address, headers: dict[str, str] | None = None): ... - def add_user_grant( - self, permission, user_id, headers: dict[str, str] | None = None, display_name: Incomplete | None = None - ): ... - def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: dict[str, str] | None = None): ... - def restore(self, days, headers: dict[str, str] | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/keyfile.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/keyfile.pyi deleted file mode 100644 index fc2efb646618..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/keyfile.pyi +++ /dev/null @@ -1,29 +0,0 @@ -from typing import Any - -class KeyFile: - key: Any - location: int - closed: bool - softspace: int - mode: str - encoding: str - errors: str - newlines: str - name: Any - def __init__(self, key) -> None: ... - def tell(self): ... - def seek(self, pos, whence: Any = 0): ... - def read(self, size): ... - def close(self): ... - def isatty(self): ... - def getkey(self): ... - def write(self, buf): ... - def fileno(self): ... - def flush(self): ... - def next(self): ... - def readinto(self): ... - def readline(self): ... - def readlines(self): ... - def truncate(self): ... - def writelines(self): ... - def xreadlines(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/lifecycle.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/lifecycle.pyi deleted file mode 100644 index b2e095695388..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/lifecycle.pyi +++ /dev/null @@ -1,70 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class Rule: - id: Any - prefix: Any - status: Any - expiration: Any - transition: Any - def __init__( - self, - id: Incomplete | None = None, - prefix: Incomplete | None = None, - status: Incomplete | None = None, - expiration: Incomplete | None = None, - transition: Incomplete | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - -class Expiration: - days: Any - date: Any - def __init__(self, days: Incomplete | None = None, date: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - -class Transition: - days: Any - date: Any - storage_class: Any - def __init__( - self, days: Incomplete | None = None, date: Incomplete | None = None, storage_class: Incomplete | None = None - ) -> None: ... - def to_xml(self): ... - -class Transitions(list[Transition]): - transition_properties: int - current_transition_property: int - temp_days: Any - temp_date: Any - temp_storage_class: Any - def __init__(self) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - def add_transition( - self, days: Incomplete | None = None, date: Incomplete | None = None, storage_class: Incomplete | None = None - ): ... - @property - def days(self): ... - @property - def date(self): ... - @property - def storage_class(self): ... - -class Lifecycle(list[Rule]): - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - def add_rule( - self, - id: Incomplete | None = None, - prefix: str = "", - status: str = "Enabled", - expiration: Incomplete | None = None, - transition: Incomplete | None = None, - ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multidelete.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multidelete.pyi deleted file mode 100644 index 3af7db1eb4ba..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multidelete.pyi +++ /dev/null @@ -1,40 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class Deleted: - key: Any - version_id: Any - delete_marker: Any - delete_marker_version_id: Any - def __init__( - self, - key: Incomplete | None = None, - version_id: Incomplete | None = None, - delete_marker: bool = False, - delete_marker_version_id: Incomplete | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class Error: - key: Any - version_id: Any - code: Any - message: Any - def __init__( - self, - key: Incomplete | None = None, - version_id: Incomplete | None = None, - code: Incomplete | None = None, - message: Incomplete | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class MultiDeleteResult: - bucket: Any - deleted: Any - errors: Any - def __init__(self, bucket: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multipart.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multipart.pyi deleted file mode 100644 index e764158f3a66..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/multipart.pyi +++ /dev/null @@ -1,74 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class CompleteMultiPartUpload: - bucket: Any - location: Any - bucket_name: Any - key_name: Any - etag: Any - version_id: Any - encrypted: Any - def __init__(self, bucket: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -class Part: - bucket: Any - part_number: Any - last_modified: Any - etag: Any - size: Any - def __init__(self, bucket: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - -def part_lister(mpupload, part_number_marker: Incomplete | None = None): ... - -class MultiPartUpload: - bucket: Any - bucket_name: Any - key_name: Any - id: Any - initiator: Any - owner: Any - storage_class: Any - initiated: Any - part_number_marker: Any - next_part_number_marker: Any - max_parts: Any - is_truncated: bool - def __init__(self, bucket: Incomplete | None = None) -> None: ... - def __iter__(self): ... - def to_xml(self): ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def get_all_parts( - self, - max_parts: Incomplete | None = None, - part_number_marker: Incomplete | None = None, - encoding_type: Incomplete | None = None, - ): ... - def upload_part_from_file( - self, - fp, - part_num, - headers: Incomplete | None = None, - replace: bool = True, - cb: Incomplete | None = None, - num_cb: int = 10, - md5: Incomplete | None = None, - size: Incomplete | None = None, - ): ... - def copy_part_from_key( - self, - src_bucket_name, - src_key_name, - part_num, - start: Incomplete | None = None, - end: Incomplete | None = None, - src_version_id: Incomplete | None = None, - headers: Incomplete | None = None, - ): ... - def complete_upload(self): ... - def cancel_upload(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/prefix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/prefix.pyi deleted file mode 100644 index d362f22c3134..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/prefix.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class Prefix: - bucket: Any - name: Any - def __init__(self, bucket: Incomplete | None = None, name: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - @property - def provider(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/tagging.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/tagging.pyi deleted file mode 100644 index e8356b4e6dd0..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/tagging.pyi +++ /dev/null @@ -1,23 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class Tag: - key: Any - value: Any - def __init__(self, key: Incomplete | None = None, value: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - def __eq__(self, other): ... - -class TagSet(list[Tag]): - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def add_tag(self, key, value): ... - def to_xml(self): ... - -class Tags(list[TagSet]): - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - def add_tag_set(self, tag_set): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/user.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/user.pyi deleted file mode 100644 index c18968340d16..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/user.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -class User: - type: Any - id: Any - display_name: Any - def __init__(self, parent: Incomplete | None = None, id: str = "", display_name: str = "") -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self, element_name: str = "Owner"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/website.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/website.pyi deleted file mode 100644 index a596cebd97d0..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/s3/website.pyi +++ /dev/null @@ -1,83 +0,0 @@ -from _typeshed import Incomplete -from typing import Any - -def tag(key, value): ... - -class WebsiteConfiguration: - suffix: Any - error_key: Any - redirect_all_requests_to: Any - routing_rules: Any - def __init__( - self, - suffix: Incomplete | None = None, - error_key: Incomplete | None = None, - redirect_all_requests_to: Incomplete | None = None, - routing_rules: Incomplete | None = None, - ) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - -class _XMLKeyValue: - translator: Any - container: Any - def __init__(self, translator, container: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - -class RedirectLocation(_XMLKeyValue): - TRANSLATOR: Any - hostname: Any - protocol: Any - def __init__(self, hostname: Incomplete | None = None, protocol: Incomplete | None = None) -> None: ... - def to_xml(self): ... - -class RoutingRules(list[RoutingRule]): - def add_rule(self, rule: RoutingRule) -> RoutingRules: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - -class RoutingRule: - condition: Any - redirect: Any - def __init__(self, condition: Incomplete | None = None, redirect: Incomplete | None = None) -> None: ... - def startElement(self, name, attrs, connection): ... - def endElement(self, name, value, connection): ... - def to_xml(self): ... - @classmethod - def when(cls, key_prefix: Incomplete | None = None, http_error_code: Incomplete | None = None): ... - def then_redirect( - self, - hostname: Incomplete | None = None, - protocol: Incomplete | None = None, - replace_key: Incomplete | None = None, - replace_key_prefix: Incomplete | None = None, - http_redirect_code: Incomplete | None = None, - ): ... - -class Condition(_XMLKeyValue): - TRANSLATOR: Any - key_prefix: Any - http_error_code: Any - def __init__(self, key_prefix: Incomplete | None = None, http_error_code: Incomplete | None = None) -> None: ... - def to_xml(self): ... - -class Redirect(_XMLKeyValue): - TRANSLATOR: Any - hostname: Any - protocol: Any - replace_key: Any - replace_key_prefix: Any - http_redirect_code: Any - def __init__( - self, - hostname: Incomplete | None = None, - protocol: Incomplete | None = None, - replace_key: Incomplete | None = None, - replace_key_prefix: Incomplete | None = None, - http_redirect_code: Incomplete | None = None, - ) -> None: ... - def to_xml(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/utils.pyi b/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/utils.pyi deleted file mode 100644 index 581955f1ce2a..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/boto/boto/utils.pyi +++ /dev/null @@ -1,147 +0,0 @@ -import datetime -import io -import logging.handlers -import subprocess -import time -from _typeshed import StrOrBytesPath -from collections.abc import Callable, Iterable, Mapping, Sequence -from contextlib import AbstractContextManager -from email.message import Message -from hashlib import _Hash -from typing import IO, Any, TypeVar -from typing_extensions import TypeAlias - -import boto.connection - -_KT = TypeVar("_KT") -_VT = TypeVar("_VT") - -_Provider: TypeAlias = Any # TODO replace this with boto.provider.Provider once stubs exist -_LockType: TypeAlias = Any # TODO replace this with _thread.LockType once stubs exist - -JSONDecodeError: type[ValueError] -qsa_of_interest: list[str] - -def unquote_v(nv: str) -> str | tuple[str, str]: ... -def canonical_string( - method: str, path: str, headers: Mapping[str, str | None], expires: int | None = None, provider: _Provider | None = None -) -> str: ... -def merge_meta( - headers: Mapping[str, str], metadata: Mapping[str, str], provider: _Provider | None = None -) -> Mapping[str, str]: ... -def get_aws_metadata(headers: Mapping[str, str], provider: _Provider | None = None) -> Mapping[str, str]: ... -def retry_url(url: str, retry_on_404: bool = True, num_retries: int = 10, timeout: int | None = None) -> str: ... - -class LazyLoadMetadata(dict[_KT, _VT]): - def __init__(self, url: str, num_retries: int, timeout: int | None = None) -> None: ... - -def get_instance_metadata( - version: str = "latest", - url: str = "http://169.254.169.254", - data: str = "meta-data/", - timeout: int | None = None, - num_retries: int = 5, -) -> LazyLoadMetadata[Any, Any] | None: ... -def get_instance_identity( - version: str = "latest", url: str = "http://169.254.169.254", timeout: int | None = None, num_retries: int = 5 -) -> Mapping[str, Any] | None: ... -def get_instance_userdata( - version: str = "latest", - sep: str | None = None, - url: str = "http://169.254.169.254", - timeout: int | None = None, - num_retries: int = 5, -) -> Mapping[str, str]: ... - -ISO8601: str -ISO8601_MS: str -RFC1123: str -LOCALE_LOCK: _LockType - -def setlocale(name: str | tuple[str, str]) -> AbstractContextManager[str]: ... -def get_ts(ts: time.struct_time | None = None) -> str: ... -def parse_ts(ts: str) -> datetime.datetime: ... -def find_class(module_name: str, class_name: str | None = None) -> type[Any] | None: ... -def update_dme(username: str, password: str, dme_id: str, ip_address: str) -> str: ... -def fetch_file( - uri: str, file: IO[str] | None = None, username: str | None = None, password: str | None = None -) -> IO[str] | None: ... - -class ShellCommand: - exit_code: int - command: subprocess._CMD - log_fp: io.StringIO - wait: bool - fail_fast: bool - def __init__( - self, command: subprocess._CMD, wait: bool = True, fail_fast: bool = False, cwd: StrOrBytesPath | None = None - ) -> None: ... - process: subprocess.Popen[Any] - def run(self, cwd: subprocess._CMD | None = None) -> int | None: ... - def setReadOnly(self, value) -> None: ... - def getStatus(self) -> int | None: ... - status: int | None - def getOutput(self) -> str: ... - output: str - -class AuthSMTPHandler(logging.handlers.SMTPHandler): - username: str - password: str - def __init__( - self, mailhost: str, username: str, password: str, fromaddr: str, toaddrs: Sequence[str], subject: str - ) -> None: ... - -class LRUCache(dict[_KT, _VT]): - class _Item: - previous: LRUCache._Item | None - next: LRUCache._Item | None - key = ... - value = ... - def __init__(self, key, value) -> None: ... - - _dict: dict[_KT, LRUCache._Item] - capacity: int - head: LRUCache._Item | None - tail: LRUCache._Item | None - def __init__(self, capacity: int) -> None: ... - -# This exists to work around Password.str's name shadowing the str type -_Str: TypeAlias = str - -class Password: - hashfunc: Callable[[bytes], _Hash] - str: _Str | None - def __init__(self, str: _Str | None = None, hashfunc: Callable[[bytes], _Hash] | None = None) -> None: ... - def set(self, value: bytes | _Str) -> None: ... - def __eq__(self, other: _Str | bytes | None) -> bool: ... # type: ignore[override] - def __len__(self) -> int: ... - -def notify( - subject: str, - body: str | None = None, - html_body: Sequence[str] | str | None = None, - to_string: str | None = None, - attachments: Iterable[Message] | None = None, - append_instance_id: bool = True, -) -> None: ... -def get_utf8_value(value: str) -> bytes: ... -def mklist(value: Any) -> list[Any]: ... -def pythonize_name(name: str) -> str: ... -def write_mime_multipart( - content: list[tuple[str, str]], compress: bool = False, deftype: str = "text/plain", delimiter: str = ":" -) -> str: ... -def guess_mime_type(content: str, deftype: str) -> str: ... -def compute_md5(fp: IO[Any], buf_size: int = 8192, size: int | None = None) -> tuple[str, str, int]: ... -def compute_hash( - fp: IO[Any], buf_size: int = 8192, size: int | None = None, hash_algorithm: Any = ... -) -> tuple[str, str, int]: ... -def find_matching_headers(name: str, headers: Mapping[str, str | None]) -> list[str]: ... -def merge_headers_by_name(name: str, headers: Mapping[str, str | None]) -> str: ... - -class RequestHook: - def handle_request_data( - self, request: boto.connection.HTTPRequest, response: boto.connection.HTTPResponse, error: bool = False - ) -> Any: ... - -def host_is_ipv6(hostname: str) -> bool: ... -def parse_host(hostname: str) -> str: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml index 313048cd7130..141ae45b44c0 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml @@ -1,4 +1,4 @@ -version = "1.15.*" +version = "1.16.*" upstream_repository = "https://github.com/asottile/flake8-typing-imports" partial_stub = true diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/METADATA.toml index eb033d7412cc..a86dce92af40 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/METADATA.toml @@ -1,4 +1,4 @@ -version = "2.7.9" +version = "2.8.1" upstream_repository = "https://github.com/PyFPDF/fpdf2" requires = ["Pillow>=10.3.0"] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/__init__.pyi index 134f8df2664d..b6d360183ceb 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/__init__.pyi @@ -1,7 +1,7 @@ from pathlib import Path from .enums import Align as Align, TextMode as TextMode, XPos as XPos, YPos as YPos -from .fonts import FontFace as FontFace +from .fonts import FontFace as FontFace, TextStyle as TextStyle from .fpdf import FPDF as FPDF, FPDFException as FPDFException, TitleStyle as TitleStyle from .html import HTML2FPDF as HTML2FPDF, HTMLMixin as HTMLMixin from .prefs import ViewerPreferences as ViewerPreferences @@ -25,6 +25,7 @@ __all__ = [ "Template", "FlexTemplate", "TitleStyle", + "TextStyle", "ViewerPreferences", "HTMLMixin", "HTML2FPDF", diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi index f9a426344f0e..648523c5c152 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi @@ -75,9 +75,13 @@ class DeviceCMYK(_DeviceCMYKBase): def rgb8(r, g, b, a: Incomplete | None = None) -> DeviceRGB: ... def gray8(g, a: Incomplete | None = None) -> DeviceGray: ... @overload -def convert_to_device_color(r: DeviceGray, g: int = -1, b: int = -1) -> DeviceGray: ... +def convert_to_device_color(r: DeviceCMYK) -> DeviceCMYK: ... @overload -def convert_to_device_color(r: DeviceRGB, g: int = -1, b: int = -1) -> DeviceRGB: ... +def convert_to_device_color(r: DeviceGray) -> DeviceGray: ... +@overload +def convert_to_device_color(r: DeviceRGB) -> DeviceRGB: ... +@overload +def convert_to_device_color(r: str) -> DeviceRGB: ... @overload def convert_to_device_color(r: int, g: Literal[-1] = -1, b: Literal[-1] = -1) -> DeviceGray: ... @overload diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi index d08f6ac20ee1..e8a66b855f3f 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi @@ -1,6 +1,6 @@ from enum import Enum, Flag, IntEnum, IntFlag from typing import Literal -from typing_extensions import Self +from typing_extensions import Self, TypeAlias from .syntax import Name @@ -38,6 +38,8 @@ class Align(CoerciveEnum): R = "RIGHT" J = "JUSTIFY" +_Align: TypeAlias = Align | Literal["CENTER", "X_CENTER", "LEFT", "RIGHT", "JUSTIFY"] # noqa: Y047 + class VAlign(CoerciveEnum): M = "MIDDLE" T = "TOP" @@ -51,6 +53,8 @@ class TextEmphasis(CoerciveIntFlag): @property def style(self) -> str: ... + def add(self, value: TextEmphasis) -> TextEmphasis: ... + def remove(self, value: TextEmphasis) -> TextEmphasis: ... class MethodReturnValue(CoerciveIntFlag): PAGE_BREAK = 1 diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi index f4e7722d88c6..eb8c934789ab 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi @@ -2,8 +2,8 @@ import dataclasses from _typeshed import Incomplete from collections.abc import Generator from dataclasses import dataclass -from typing import overload -from typing_extensions import Self +from typing import Final, overload +from typing_extensions import Self, deprecated from .drawing import DeviceGray, DeviceRGB, Number from .enums import TextEmphasis @@ -39,6 +39,40 @@ class FontFace: @staticmethod def combine(default_style: FontFace | None, override_style: FontFace | None) -> FontFace: ... +class TextStyle(FontFace): + t_margin: int + l_margin: int + b_margin: int + def __init__( + self, + font_family: str | None = None, + font_style: str | None = None, + font_size_pt: int | None = None, + color: int | tuple[int, int, int] | None = None, + fill_color: int | tuple[int, int, int] | None = None, + underline: bool = False, + t_margin: int | None = None, + l_margin: int | None = None, + b_margin: int | None = None, + ): ... + def replace( # type: ignore[override] + self, + /, + font_family: str | None = None, + emphasis: TextEmphasis | None = None, + font_size_pt: int | None = None, + color: int | tuple[int, int, int] | None = None, + fill_color: int | tuple[int, int, int] | None = None, + t_margin: int | None = None, + l_margin: int | None = None, + b_margin: int | None = None, + ) -> TextStyle: ... + +@deprecated("fpdf.TitleStyle is deprecated since 2.7.10. It has been replaced by fpdf.TextStyle.") +class TitleStyle(TextStyle): ... + +__pdoc__: Final[dict[str, bool]] + class _FontMixin: i: int type: str diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi index 998e8e18b6d7..1508aad89465 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi @@ -14,28 +14,33 @@ from PIL import Image from .annotations import AnnotationDict, PDFEmbeddedFile from .drawing import DeviceGray, DeviceRGB, DrawingContext, PaintedPath from .enums import ( + AccessPermission, Align, AnnotationFlag, AnnotationName, Corner, + EncryptionMethod, FileAttachmentAnnotationName, MethodReturnValue, PageLayout, + PageMode, PathPaintRule, RenderStyle, TableBordersLayout, TableCellFillMode, TableHeadingsDisplay, TextDirection, + TextEmphasis, TextMarkupType, TextMode as TextMode, VAlign, WrapMode as WrapMode, XPos as XPos, YPos as YPos, + _Align, ) from .errors import FPDFException as FPDFException -from .fonts import FontFace +from .fonts import FontFace, TextStyle, TitleStyle as TitleStyle from .graphics_state import GraphicsStateMixin from .html import HTML2FPDF from .image_datastructures import ( @@ -73,28 +78,11 @@ _FontStyles: TypeAlias = Literal["", "B", "I", "U", "BU", "UB", "BI", "IB", "IU" FPDF_VERSION: Final[str] PAGE_FORMATS: dict[_Format, tuple[float, float]] -class TitleStyle(FontFace): - t_margin: int | None - l_margin: int | None - b_margin: int | None - - def __init__( - self, - font_family: str | None = None, - font_style: str | None = None, - font_size_pt: int | None = None, - color: int | tuple[int, int, int] | None = None, - underline: bool = False, - t_margin: int | None = None, - l_margin: int | None = None, - b_margin: int | None = None, - ) -> None: ... - class ToCPlaceholder(NamedTuple): render_function: Callable[[FPDF, Any], object] start_page: int y: int - pages: int = ... + pages: int = 1 def get_page_format(format: _Format | tuple[float, float], k: float | None = None) -> tuple[float, float]: ... @@ -105,6 +93,7 @@ class FPDF(GraphicsStateMixin): MARKDOWN_BOLD_MARKER: ClassVar[str] MARKDOWN_ITALICS_MARKER: ClassVar[str] MARKDOWN_UNDERLINE_MARKER: ClassVar[str] + MARKDOWN_ESCAPE_CHARACTER: ClassVar[str] MARKDOWN_LINK_REGEX: ClassVar[Pattern[str]] MARKDOWN_LINK_COLOR: ClassVar[Incomplete | None] MARKDOWN_LINK_UNDERLINE: ClassVar[bool] @@ -114,9 +103,11 @@ class FPDF(GraphicsStateMixin): page: int pages: dict[int, PDFPage] fonts: dict[str, _Font] + fonts_used_per_page_number: dict[int, set[int]] links: dict[int, DestinationXYZ] embedded_files: list[PDFEmbeddedFile] image_cache: ImageCache + images_used_per_page_number: dict[int, set[int]] in_footer: bool str_alias_nb_pages: str @@ -128,7 +119,7 @@ class FPDF(GraphicsStateMixin): oversized_images: Incomplete | None oversized_images_ratio: float struct_builder: StructureTreeBuilder - section_title_styles: dict[int, Incomplete] + section_title_styles: dict[int, TextStyle] core_fonts: dict[str, str] core_fonts_encoding: str @@ -149,6 +140,7 @@ class FPDF(GraphicsStateMixin): compress: bool pdf_version: str creation_date: datetime.datetime + graphics_style_names_per_page_number: dict[int, set[str]] buffer: bytearray | None @@ -166,21 +158,22 @@ class FPDF(GraphicsStateMixin): format: _Format | tuple[float, float] = "A4", font_cache_dir: Literal["DEPRECATED"] = "DEPRECATED", ) -> None: ... - # The following definition crashes stubtest 1.1.1. - # def set_encryption( - # self, - # owner_password: str, - # user_password: str | None = None, - # encryption_method: EncryptionMethod | str = ..., - # permissions: AccessPermission = ..., - # encrypt_metadata: bool = False, - # ) -> None: ... + def set_encryption( + self, + owner_password: str, + user_password: str | None = None, + encryption_method: EncryptionMethod | str = ..., + permissions: AccessPermission = ..., + encrypt_metadata: bool = False, + ) -> None: ... # args and kwargs are passed to HTML2FPDF_CLASS constructor. def write_html(self, text: str, *args: Any, **kwargs: Any) -> None: ... @property + def emphasis(self) -> TextEmphasis: ... + @property def is_ttf_font(self) -> bool: ... @property - def page_mode(self): ... + def page_mode(self) -> PageMode: ... @property def epw(self) -> float: ... @property @@ -280,7 +273,7 @@ class FPDF(GraphicsStateMixin): corner_radius: float = 0, ) -> None: ... def ellipse(self, x: float, y: float, w: float, h: float, style: RenderStyle | str | None = None) -> None: ... - def circle(self, x: float, y: float, r, style: RenderStyle | str | None = None) -> None: ... + def circle(self, x: float, y: float, radius: float, style: RenderStyle | str | None = None) -> None: ... def regular_polygon( self, x: float, @@ -326,6 +319,12 @@ class FPDF(GraphicsStateMixin): clockwise: bool = False, style: RenderStyle | str | None = None, ) -> None: ... + def bezier( + self, + point_list: Sequence[tuple[int, int]], + closed: bool = False, + style: RenderStyle | Literal["D", "F", "DF", "FD"] | None = None, + ) -> None: ... def add_font( self, family: str | None = None, @@ -429,15 +428,45 @@ class FPDF(GraphicsStateMixin): def mirror(self, origin, angle) -> Generator[None]: ... def local_context( self, + *, font_family: Incomplete | None = None, font_style: Incomplete | None = None, - font_size: Incomplete | None = None, + font_size_pt: Incomplete | None = None, line_width: Incomplete | None = None, draw_color: Incomplete | None = None, fill_color: Incomplete | None = None, text_color: Incomplete | None = None, dash_pattern: Incomplete | None = None, - **kwargs, + font_size=..., # semi-deprecated, prefer font_size_pt + char_vpos=..., + char_spacing=..., + current_font=..., + denom_lift=..., + denom_scale=..., + font_stretching=..., + nom_lift=..., + nom_scale=..., + sub_lift=..., + sub_scale=..., + sup_lift=..., + sup_scale=..., + text_mode=..., + text_shaping=..., + underline=..., + paint_rule=..., + allow_transparency=..., + auto_close=..., + intersection_rule=..., + fill_opacity=..., + stroke_color=..., + stroke_opacity=..., + blend_mode=..., + stroke_width=..., + stroke_cap_style=..., + stroke_join_style=..., + stroke_miter_limit=..., + stroke_dash_pattern=..., + stroke_dash_phase=..., ) -> _GeneratorContextManager[None]: ... @property def accept_page_break(self) -> bool: ... @@ -513,6 +542,7 @@ class FPDF(GraphicsStateMixin): dims: tuple[float, float] | None = None, keep_aspect_ratio: bool = False, ) -> RasterImageInfo | VectorImageInfo: ... + def x_by_align(self, x: _Align, w: int, h: int, img_info: ImageInfo, keep_aspect_ratio: bool) -> int: ... @deprecated("Deprecated since 2.7.7; use fpdf.image_parsing.preload_image() instead") def preload_image( self, name: str | Image.Image | BytesIO, dims: tuple[float, float] | None = None @@ -558,13 +588,13 @@ class FPDF(GraphicsStateMixin): def insert_toc_placeholder(self, render_toc_function, pages: int = 1) -> None: ... def set_section_title_styles( self, - level0: TitleStyle, - level1: TitleStyle | None = None, - level2: TitleStyle | None = None, - level3: TitleStyle | None = None, - level4: TitleStyle | None = None, - level5: TitleStyle | None = None, - level6: TitleStyle | None = None, + level0: TextStyle, + level1: TextStyle | None = None, + level2: TextStyle | None = None, + level3: TextStyle | None = None, + level4: TextStyle | None = None, + level5: TextStyle | None = None, + level6: TextStyle | None = None, ) -> None: ... def start_section(self, name: str, level: int = 0, strict: bool = True) -> None: ... def use_font_face(self, font_face: FontFace) -> _GeneratorContextManager[None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi index 21e794441ad4..443968afcbf9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi @@ -1,12 +1,13 @@ -from _typeshed import Incomplete, SupportsItemAccess, SupportsKeysAndGetItem, Unused +from _typeshed import Incomplete, SupportsKeysAndGetItem from collections.abc import Callable, Iterable, Mapping from html.parser import HTMLParser from logging import Logger -from typing import ClassVar, Final, Literal, TypedDict, type_check_only +from typing import ClassVar, Final, Literal from typing_extensions import TypeAlias from fpdf import FPDF +from .enums import TextEmphasis from .fonts import FontFace from .table import Row, Table @@ -20,17 +21,13 @@ BULLET_WIN1252: Final[str] DEGREE_WIN1252: Final[str] HEADING_TAGS: Final[tuple[str, ...]] DEFAULT_TAG_STYLES: Final[dict[str, FontFace]] -DEFAULT_TAG_INDENTS: Final[dict[str, int]] +INLINE_TAGS: Final[tuple[str, ...]] +BLOCK_TAGS: Final[tuple[str, ...]] COLOR_DICT: Final[dict[str, str]] def color_as_decimal(color: str | None = "#000000") -> tuple[int, int, int] | None: ... -def parse_style(elem_attrs: SupportsItemAccess[str, str]) -> None: ... -@type_check_only -class _Emphasis(TypedDict): - b: bool - i: bool - u: bool +def parse_css_style(style_attr: str) -> dict[str, str]: ... class HTML2FPDF(HTMLParser): HTML_UNCLOSED_TAGS: ClassVar[tuple[str, ...]] @@ -41,20 +38,23 @@ class HTML2FPDF(HTMLParser): ul_bullet_char: str li_prefix_color: tuple[int, int, int] warn_on_tags_not_matching: bool - emphasis: _Emphasis - font_size: float + + font_family: str + font_size_pt: float + font_emphasis: TextEmphasis + font_color: tuple[int, int, int] + + style_stack: list[FontFace] + h: float follows_trailing_space: bool follows_heading: bool href: str align: str - style_stack: list[FontFace] indent: int + line_height_stack: list[Incomplete] ol_type: list[_OLType] bullet: list[Incomplete] - font_color: tuple[int, int, int] heading_level: Incomplete | None - heading_above: float - heading_below: float table_line_separators: bool table: Table | None table_row: Row | None @@ -63,32 +63,25 @@ class HTML2FPDF(HTMLParser): tag_indents: dict[str, int] tag_styles: dict[str, FontFace] - # Not initialized in __init__: - font_family: str - h: float - def __init__( self, pdf: FPDF, image_map: Callable[[str], str] | None = None, - li_tag_indent: int = 5, - dd_tag_indent: int = 10, + li_tag_indent: int | None = None, + dd_tag_indent: int | None = None, table_line_separators: bool = False, ul_bullet_char: str = "\x95", li_prefix_color: tuple[int, int, int] = (190, 0, 0), heading_sizes: SupportsKeysAndGetItem[str, int] | Iterable[tuple[str, int]] | None = None, - pre_code_font: str = ..., + pre_code_font: str | None = None, warn_on_tags_not_matching: bool = True, tag_indents: dict[str, int] | None = None, tag_styles: Mapping[str, FontFace] | None = None, - **_: Unused, - ): ... + font_family: str = "times", + ) -> None: ... def handle_data(self, data) -> None: ... def handle_starttag(self, tag, attrs) -> None: ... def handle_endtag(self, tag) -> None: ... - def set_font(self, family: str | None = None, size: float | None = None, set_default: bool = False) -> None: ... - def set_style(self, tag: Incomplete | None = None, enable: bool = False) -> None: ... - def set_text_color(self, r: Incomplete | None = None, g: int = 0, b: int = 0) -> None: ... def put_link(self, text) -> None: ... def render_toc(self, pdf, outline) -> None: ... def error(self, message: str) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi index b81fb5865994..24f3dd65bb7c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/image_datastructures.pyi @@ -4,7 +4,6 @@ from typing import Any, Literal from typing_extensions import TypeAlias from fpdf.enums import Align -from fpdf.fpdf import FPDF from .image_parsing import _ImageFilter @@ -31,7 +30,7 @@ _AlignLiteral: TypeAlias = Literal[ "r", "j", ] -_TextAlign: TypeAlias = Align | _AlignLiteral +_TextAlign: TypeAlias = Align | _AlignLiteral # noqa: Y047 class ImageInfo(dict[str, Any]): @property @@ -43,8 +42,6 @@ class ImageInfo(dict[str, Any]): @property def rendered_height(self) -> int: ... def scale_inside_box(self, x: float, y: float, w: float, h: float) -> tuple[float, float, float, float]: ... - @staticmethod - def x_by_align(x: _TextAlign, w: float, pdf: FPDF, keep_aspect_ratio: Literal[False]) -> float: ... class RasterImageInfo(ImageInfo): def size_in_document_units(self, w: float, h: float, scale=1) -> tuple[float, float]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi index d17af4255c80..d71917cd0d83 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi @@ -7,6 +7,8 @@ from .enums import Align, TextDirection, WrapMode SOFT_HYPHEN: Final[str] HYPHEN: Final[str] SPACE: Final[str] +BREAKING_SPACE_SYMBOLS: Final[list[str]] +BREAKING_SPACE_SYMBOLS_STR: Final[str] NBSP: Final[str] NEWLINE: Final[str] FORM_FEED: Final[str] @@ -128,7 +130,7 @@ class CurrentLine: def trim_trailing_spaces(self) -> None: ... def manual_break(self, align: Align, trailing_nl: bool = False, trailing_form_feed: bool = False) -> TextLine: ... def automatic_break_possible(self) -> bool: ... - def automatic_break(self, align: Align): ... + def automatic_break(self, align: Align) -> tuple[Incomplete, Incomplete, TextLine]: ... class MultiLineBreak: fragments: Sequence[Fragment] @@ -153,4 +155,4 @@ class MultiLineBreak: line_height: float = 1.0, skip_leading_spaces: bool = False, ) -> None: ... - def get_line(self): ... + def get_line(self) -> TextLine: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi index 885716dbcfa5..5da8df372ea1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi @@ -10,7 +10,7 @@ class OutlineSection(NamedTuple): level: int page_number: int dest: Destination - struct_elem: StructElem | None = ... + struct_elem: StructElem | None = None class OutlineItemDictionary(PDFObject): title: PDFString diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi index a3430949d98d..c000e828fbb7 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi @@ -105,7 +105,7 @@ class Cell: class RowLayoutInfo: height: int pagebreak_height: float - rendered_height: dict[Incomplete, Incomplete] + rendered_heights: dict[Incomplete, Incomplete] merged_heights: list[Incomplete] @dataclass(frozen=True) diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/template.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/template.pyi index 12addfb78296..e795850c5054 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/template.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/template.pyi @@ -1,4 +1,5 @@ from _typeshed import Incomplete +from os import PathLike from typing import Any __author__: str @@ -14,7 +15,10 @@ class FlexTemplate: elements: Any keys: Any def load_elements(self, elements) -> None: ... - def parse_csv(self, infile, delimiter: str = ",", decimal_sep: str = ".", encoding: Incomplete | None = None): ... + def parse_json(self, infile: PathLike[Any], encoding: str = "utf-8") -> None: ... + def parse_csv( + self, infile: PathLike[Any], delimiter: str = ",", decimal_sep: str = ".", encoding: str | None = None + ) -> None: ... def __setitem__(self, name, value) -> None: ... set: Any def __contains__(self, name): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi index a9d4c2920b64..6cc4396a3aa3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/text_region.pyi @@ -5,6 +5,7 @@ from typing_extensions import Self from .enums import Align, WrapMode from .image_datastructures import RasterImageInfo, VectorImageInfo, _TextAlign +from .line_break import Fragment, TextLine class Extents(NamedTuple): left: float @@ -22,14 +23,24 @@ class LineWrapper(NamedTuple): first_line: bool = False last_line: bool = False +class Bullet: + fragments: Sequence[Fragment] + text_line: TextLine + r_margin: float + rendered_flag: bool + def __init__(self, bullet_fragments: Sequence[Fragment], text_line: TextLine, bullet_r_margin: float) -> None: ... + def get_fragments_width(self) -> float: ... + class Paragraph: pdf: Incomplete text_align: Align line_height: Incomplete top_margin: Incomplete bottom_margin: Incomplete - skip_leading_spaces: Incomplete + indent: float + skip_leading_spaces: bool wrapmode: Incomplete + bullet: Bullet | None def __init__( self, @@ -38,12 +49,18 @@ class Paragraph: line_height: Incomplete | None = None, top_margin: float = 0, bottom_margin: float = 0, + indent: float = 0, + bullet_r_margin: float | None = None, + bullet_string: str = "", skip_leading_spaces: bool = False, wrapmode: WrapMode | None = None, ) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, traceback) -> None: ... def write(self, text: str, link: Incomplete | None = None): ... + def generate_bullet_frags_and_tl( + self, bullet_string: str, bullet_r_margin: float + ) -> tuple[tuple[Fragment, ...], TextLine] | None: ... def ln(self, h: float | None = None) -> None: ... def build_lines(self, print_sh: bool) -> list[LineWrapper]: ... @@ -113,8 +130,11 @@ class ParagraphCollectorMixin: skip_leading_spaces: bool = False, top_margin: int = 0, bottom_margin: int = 0, + indent: int = 0, + bullet_string: str = "", + bullet_r_margin: float | None = None, wrapmode: WrapMode | None = None, - ): ... + ) -> Paragraph: ... def end_paragraph(self) -> None: ... def image( self, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/unicode_script.pyi b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/unicode_script.pyi new file mode 100644 index 000000000000..49e56f2d2923 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/fpdf2/fpdf/unicode_script.pyi @@ -0,0 +1,172 @@ +from enum import IntEnum +from typing import Final + +class UnicodeScript(IntEnum): + COMMON = 0 + LATIN = 1 + GREEK = 2 + CYRILLIC = 3 + ARMENIAN = 4 + HEBREW = 5 + ARABIC = 6 + SYRIAC = 7 + THAANA = 8 + DEVANAGARI = 9 + BENGALI = 10 + GURMUKHI = 11 + GUJARATI = 12 + ORIYA = 13 + TAMIL = 14 + TELUGU = 15 + KANNADA = 16 + MALAYALAM = 17 + SINHALA = 18 + THAI = 19 + LAO = 20 + TIBETAN = 21 + MYANMAR = 22 + GEORGIAN = 23 + HANGUL = 24 + ETHIOPIC = 25 + CHEROKEE = 26 + CANADIAN_ABORIGINAL = 27 + OGHAM = 28 + RUNIC = 29 + KHMER = 30 + MONGOLIAN = 31 + HIRAGANA = 32 + KATAKANA = 33 + BOPOMOFO = 34 + HAN = 35 + YI = 36 + OLD_ITALIC = 37 + GOTHIC = 38 + DESERET = 39 + INHERITED = 40 + TAGALOG = 41 + HANUNOO = 42 + BUHID = 43 + TAGBANWA = 44 + LIMBU = 45 + TAI_LE = 46 + LINEAR_B = 47 + UGARITIC = 48 + SHAVIAN = 49 + OSMANYA = 50 + CYPRIOT = 51 + BRAILLE = 52 + BUGINESE = 53 + COPTIC = 54 + NEW_TAI_LUE = 55 + GLAGOLITIC = 56 + TIFINAGH = 57 + SYLOTI_NAGRI = 58 + OLD_PERSIAN = 59 + KHAROSHTHI = 60 + BALINESE = 61 + CUNEIFORM = 62 + PHOENICIAN = 63 + PHAGS_PA = 64 + NKO = 65 + SUNDANESE = 66 + LEPCHA = 67 + OL_CHIKI = 68 + VAI = 69 + SAURASHTRA = 70 + KAYAH_LI = 71 + REJANG = 72 + LYCIAN = 73 + CARIAN = 74 + LYDIAN = 75 + CHAM = 76 + TAI_THAM = 77 + TAI_VIET = 78 + AVESTAN = 79 + EGYPTIAN_HIEROGLYPHS = 80 + SAMARITAN = 81 + LISU = 82 + BAMUM = 83 + JAVANESE = 84 + MEETEI_MAYEK = 85 + IMPERIAL_ARAMAIC = 86 + OLD_SOUTH_ARABIAN = 87 + INSCRIPTIONAL_PARTHIAN = 88 + INSCRIPTIONAL_PAHLAVI = 89 + OLD_TURKIC = 90 + KAITHI = 91 + BATAK = 92 + BRAHMI = 93 + MANDAIC = 94 + CHAKMA = 95 + MEROITIC_CURSIVE = 96 + MEROITIC_HIEROGLYPHS = 97 + MIAO = 98 + SHARADA = 99 + SORA_SOMPENG = 100 + TAKRI = 101 + CAUCASIAN_ALBANIAN = 102 + BASSA_VAH = 103 + DUPLOYAN = 104 + ELBASAN = 105 + GRANTHA = 106 + PAHAWH_HMONG = 107 + KHOJKI = 108 + LINEAR_A = 109 + MAHAJANI = 110 + MANICHAEAN = 111 + MENDE_KIKAKUI = 112 + MODI = 113 + MRO = 114 + OLD_NORTH_ARABIAN = 115 + NABATAEAN = 116 + PALMYRENE = 117 + PAU_CIN_HAU = 118 + OLD_PERMIC = 119 + PSALTER_PAHLAVI = 120 + SIDDHAM = 121 + KHUDAWADI = 122 + TIRHUTA = 123 + WARANG_CITI = 124 + AHOM = 125 + ANATOLIAN_HIEROGLYPHS = 126 + HATRAN = 127 + MULTANI = 128 + OLD_HUNGARIAN = 129 + SIGNWRITING = 130 + ADLAM = 131 + BHAIKSUKI = 132 + MARCHEN = 133 + NEWA = 134 + OSAGE = 135 + TANGUT = 136 + MASARAM_GONDI = 137 + NUSHU = 138 + SOYOMBO = 139 + ZANABAZAR_SQUARE = 140 + DOGRA = 141 + GUNJALA_GONDI = 142 + MAKASAR = 143 + MEDEFAIDRIN = 144 + HANIFI_ROHINGYA = 145 + SOGDIAN = 146 + OLD_SOGDIAN = 147 + ELYMAIC = 148 + NANDINAGARI = 149 + NYIAKENG_PUACHUE_HMONG = 150 + WANCHO = 151 + CHORASMIAN = 152 + DIVES_AKURU = 153 + KHITAN_SMALL_SCRIPT = 154 + YEZIDI = 155 + CYPRO_MINOAN = 156 + OLD_UYGHUR = 157 + TANGSA = 158 + TOTO = 159 + VITHKUQI = 160 + KAWI = 161 + NAG_MUNDARI = 162 + UNKNOWN = 999 + +UNICODE_RANGE_TO_SCRIPT: Final[tuple[tuple[int, int, int]]] + +def get_unicode_script(char: str) -> UnicodeScript: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/gdb/METADATA.toml index d3c20cd2180c..8aa64fa66bab 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/METADATA.toml @@ -1,4 +1,4 @@ -version = "12.1.*" +version = "15.0.*" # This is the official web portal for GDB, # see https://sourceware.org/gdb/current/ for other ways of obtaining the source code. upstream_repository = "https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=tree" diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameDecorator.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameDecorator.pyi index f6cef0dd9302..5ec95901e46a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameDecorator.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameDecorator.pyi @@ -7,13 +7,18 @@ class SymValueWrapper(Protocol): def symbol(self) -> gdb.Symbol | str: ... def value(self) -> gdb._ValueOrNative | None: ... -class FrameDecorator: +class _FrameDecoratorBase: def __init__(self, base: gdb.Frame | FrameDecorator) -> None: ... def elided(self) -> Iterator[gdb.Frame] | None: ... def function(self) -> str | None: ... def address(self) -> int | None: ... - def filename(self) -> str | None: ... def line(self) -> int | None: ... def frame_args(self) -> Iterator[SymValueWrapper] | None: ... def frame_locals(self) -> Iterator[SymValueWrapper] | None: ... def inferior_frame(self) -> gdb.Frame: ... + +class FrameDecorator(_FrameDecoratorBase): + def filename(self) -> str | None: ... + +class DAPFrameDecorator(_FrameDecoratorBase): + def filename(self) -> str | None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameIterator.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameIterator.pyi index 6238a399cb18..26e1dd436012 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameIterator.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/FrameIterator.pyi @@ -5,5 +5,4 @@ class FrameIterator: def __init__(self, frame_obj: gdb.Frame) -> None: ... def __iter__(self) -> FrameIterator: ... - def next(self) -> gdb.Frame: ... def __next__(self) -> gdb.Frame: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/__init__.pyi index 0a572d31e0e4..b7cb8209f30a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/__init__.pyi @@ -3,9 +3,11 @@ # (https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html). import _typeshed +import threading +from _typeshed import Incomplete from collections.abc import Callable, Iterator, Mapping, Sequence from contextlib import AbstractContextManager -from typing import Any, Generic, Literal, Protocol, TypeVar, final, overload +from typing import Any, Final, Generic, Literal, Protocol, TypeVar, final, overload from typing_extensions import TypeAlias, deprecated import gdb.FrameDecorator @@ -136,6 +138,8 @@ class Value: def string(self, encoding: str = ..., errors: str = ..., length: int = ...) -> str: ... def lazy_string(self, encoding: str = ..., length: int = ...) -> LazyString: ... def fetch_lazy(self) -> None: ... + def assign(self, val): ... + def to_array(self): ... # Types @@ -193,33 +197,46 @@ class Field: type: Type | None parent_type: Type -TYPE_CODE_PTR: int -TYPE_CODE_ARRAY: int -TYPE_CODE_STRUCT: int -TYPE_CODE_UNION: int -TYPE_CODE_ENUM: int -TYPE_CODE_FLAGS: int -TYPE_CODE_FUNC: int -TYPE_CODE_INT: int -TYPE_CODE_FLT: int -TYPE_CODE_VOID: int -TYPE_CODE_SET: int -TYPE_CODE_RANGE: int -TYPE_CODE_STRING: int -TYPE_CODE_BITSTRING: int -TYPE_CODE_ERROR: int -TYPE_CODE_METHOD: int -TYPE_CODE_METHODPTR: int -TYPE_CODE_MEMBERPTR: int -TYPE_CODE_REF: int -TYPE_CODE_RVALUE_REF: int -TYPE_CODE_CHAR: int -TYPE_CODE_BOOL: int -TYPE_CODE_COMPLEX: int -TYPE_CODE_TYPEDEF: int -TYPE_CODE_NAMESPACE: int -TYPE_CODE_DECFLOAT: int -TYPE_CODE_INTERNAL_FUNCTION: int +TYPE_CODE_BITSTRING: Final = -1 +TYPE_CODE_PTR: Final = 1 +TYPE_CODE_ARRAY: Final = 2 +TYPE_CODE_STRUCT: Final = 3 +TYPE_CODE_UNION: Final = 4 +TYPE_CODE_ENUM: Final = 5 +TYPE_CODE_FLAGS: Final = 6 +TYPE_CODE_FUNC: Final = 7 +TYPE_CODE_INT: Final = 8 +TYPE_CODE_FLT: Final = 9 +TYPE_CODE_VOID: Final = 10 +TYPE_CODE_SET: Final = 11 +TYPE_CODE_RANGE: Final = 12 +TYPE_CODE_STRING: Final = 13 +TYPE_CODE_ERROR: Final = 14 +TYPE_CODE_METHOD: Final = 15 +TYPE_CODE_METHODPTR: Final = 16 +TYPE_CODE_MEMBERPTR: Final = 17 +TYPE_CODE_REF: Final = 18 +TYPE_CODE_RVALUE_REF: Final = 19 +TYPE_CODE_CHAR: Final = 20 +TYPE_CODE_BOOL: Final = 21 +TYPE_CODE_COMPLEX: Final = 22 +TYPE_CODE_TYPEDEF: Final = 23 +TYPE_CODE_NAMESPACE: Final = 24 +TYPE_CODE_DECFLOAT: Final = 25 +TYPE_CODE_MODULE: Final = 26 +TYPE_CODE_INTERNAL_FUNCTION: Final = 27 +TYPE_CODE_XMETHOD: Final = 28 +TYPE_CODE_FIXED_POINT: Final = 29 +TYPE_CODE_NAMELIST: Final = 30 + +SEARCH_UNDEF_DOMAIN: Final[int] +SEARCH_VAR_DOMAIN: Final[int] +SEARCH_STRUCT_DOMAIN: Final[int] +SEARCH_MODULE_DOMAIN: Final[int] +SEARCH_LABEL_DOMAIN: Final[int] +SEARCH_COMMON_BLOCK_DOMAIN: Final[int] +SEARCH_TYPE_DOMAIN: Final[int] +SEARCH_FUNCTION_DOMAIN: Final[int] # Pretty Printing @@ -259,8 +276,16 @@ class PendingFrame: def read_register(self, reg: str | RegisterDescriptor | int, /) -> Value: ... def create_unwind_info(self, frame_id: object, /) -> UnwindInfo: ... def architecture(self) -> Architecture: ... + def language(self): ... def level(self) -> int: ... + def name(self) -> str: ... + def pc(self) -> int: ... + def block(self) -> Block: ... + def find_sal(self) -> Symtab_and_line: ... + def function(self) -> Symbol: ... + def is_valid(self) -> bool: ... +@final class UnwindInfo: def add_saved_register(self, reg: str | RegisterDescriptor | int, value: Value, /) -> None: ... @@ -281,6 +306,8 @@ class Inferior: pid: int was_attached: bool progspace: Progspace + main_name: Incomplete + arguments: Incomplete def is_valid(self) -> bool: ... def threads(self) -> tuple[InferiorThread, ...]: ... @@ -291,9 +318,14 @@ class Inferior: def thread_from_handle(self, handle: Value) -> InferiorThread: ... @deprecated("Use gdb.thread_from_handle() instead.") def thread_from_thread_handle(self, handle: Value) -> InferiorThread: ... + def set_env(self, name: str, value: str) -> None: ... + def unset_env(self, name: str) -> None: ... + def clear_env(self) -> None: ... # Threads +class Thread(threading.Thread): ... + def selected_thread() -> InferiorThread: ... @final class InferiorThread: @@ -302,6 +334,7 @@ class InferiorThread: num: int global_num: int ptid: tuple[int, int, int] + ptid_string: str inferior: Inferior def is_valid(self) -> bool: ... @@ -429,15 +462,19 @@ def current_progspace() -> Progspace | None: ... def progspaces() -> Sequence[Progspace]: ... @final class Progspace: - filename: str + executable_filename: str | None + filename: str | None + symbol_file: Objfile | None pretty_printers: list[_PrettyPrinterLookupFunction] type_printers: list[gdb.types._TypePrinter] frame_filters: dict[str, _FrameFilter] frame_unwinders: list[gdb.unwinder.Unwinder] + missing_debug_handlers: Incomplete def block_for_pc(self, pc: int, /) -> Block | None: ... def find_pc_line(self, pc: int, /) -> Symtab_and_line: ... def is_valid(self) -> bool: ... + def objfile_for_address(self, address: int, /) -> Objfile | None: ... def objfiles(self) -> Sequence[Objfile]: ... def solib_name(self, address: int, /) -> str | None: ... @@ -457,6 +494,7 @@ class Objfile: type_printers: list[gdb.types._TypePrinter] frame_filters: dict[str, _FrameFilter] frame_unwinders: list[gdb.unwinder.Unwinder] + is_file: bool def is_valid(self) -> bool: ... def add_separate_debug_file(self, file: str) -> None: ... @@ -504,6 +542,8 @@ class Frame: def read_var(self, variable: str | Symbol, /, block: Block | None = ...) -> Value: ... def select(self) -> None: ... def level(self) -> int: ... + def static_link(self) -> Incomplete | None: ... + def language(self): ... # Blocks @@ -552,34 +592,31 @@ class Symbol: def is_valid(self) -> bool: ... def value(self, frame: Frame = ..., /) -> Value: ... -SYMBOL_UNDEF_DOMAIN: int -SYMBOL_VAR_DOMAIN: int -SYMBOL_STRUCT_DOMAIN: int -SYMBOL_LABEL_DOMAIN: int -SYMBOL_MODULE_DOMAIN: int -SYMBOL_COMMON_BLOCK_DOMAIN: int - -# The constants were never correct. Use gdb.SYMBOL_VAR_DOMAIN instead. -SYMBOL_VARIABLES_DOMAIN: int -SYMBOL_FUNCTIONS_DOMAIN: int -SYMBOL_TYPES_DOMAIN: int - -SYMBOL_LOC_UNDEF: int -SYMBOL_LOC_CONST: int -SYMBOL_LOC_STATIC: int -SYMBOL_LOC_REGISTER: int -SYMBOL_LOC_ARG: int -SYMBOL_LOC_REF_ARG: int -SYMBOL_LOC_REGPARM_ADDR: int -SYMBOL_LOC_LOCAL: int -SYMBOL_LOC_TYPEDEF: int -SYMBOL_LOC_LABEL: int -SYMBOL_LOC_BLOCK: int -SYMBOL_LOC_CONST_BYTES: int -SYMBOL_LOC_UNRESOLVED: int -SYMBOL_LOC_OPTIMIZED_OUT: int -SYMBOL_LOC_COMPUTED: int -SYMBOL_LOC_COMMON_BLOCK: int +SYMBOL_UNDEF_DOMAIN: Final = 0 +SYMBOL_VAR_DOMAIN: Final = 1 +SYMBOL_STRUCT_DOMAIN: Final = 2 +SYMBOL_MODULE_DOMAIN: Final = 3 +SYMBOL_LABEL_DOMAIN: Final = 4 +SYMBOL_COMMON_BLOCK_DOMAIN: Final = 5 +SYMBOL_TYPE_DOMAIN: Final = 6 +SYMBOL_FUNCTION_DOMAIN: Final = 7 + +SYMBOL_LOC_UNDEF: Final = 0 +SYMBOL_LOC_CONST: Final = 1 +SYMBOL_LOC_STATIC: Final = 2 +SYMBOL_LOC_REGISTER: Final = 3 +SYMBOL_LOC_ARG: Final = 4 +SYMBOL_LOC_REF_ARG: Final = 5 +SYMBOL_LOC_REGPARM_ADDR: Final = 6 +SYMBOL_LOC_LOCAL: Final = 7 +SYMBOL_LOC_TYPEDEF: Final = 8 +SYMBOL_LOC_LABEL: Final = 9 +SYMBOL_LOC_BLOCK: Final = 10 +SYMBOL_LOC_CONST_BYTES: Final = 11 +SYMBOL_LOC_UNRESOLVED: Final = 12 +SYMBOL_LOC_OPTIMIZED_OUT: Final = 13 +SYMBOL_LOC_COMPUTED: Final = 14 +SYMBOL_LOC_COMMON_BLOCK: Final = 15 # Symbol tables @@ -658,10 +695,22 @@ class Breakpoint: temporary: bool hit_count: int location: str | None + locations: Incomplete + inferior: int | None expression: str | None condition: str | None commands: str | None +@final +class BreakpointLocation: + address: Incomplete + enabled: bool + fullname: str + function: Incomplete + owner: Incomplete + source: Incomplete + thread_groups: Incomplete + BP_NONE: int BP_BREAKPOINT: int BP_HARDWARE_BREAKPOINT: int @@ -768,18 +817,26 @@ class ExitedEvent(Event): exit_code: int inferior: Inferior +class ThreadExitedEvent(Event): ... class StopEvent(ThreadEvent): ... class BreakpointEvent(StopEvent): breakpoints: Sequence[Breakpoint] breakpoint: Breakpoint +missing_debug_handlers: list[Incomplete] + class NewObjFileEvent(Event): new_objfile: Objfile +class FreeObjFileEvent(Event): ... + class ClearObjFilesEvent(Event): progspace: Progspace +class NewProgspaceEvent(Event): ... +class FreeProgspaceEvent(Event): ... + class SignalEvent(StopEvent): stop_signal: str @@ -815,9 +872,15 @@ class GdbExitingEvent(Event): class ConnectionEvent(Event): connection: TargetConnection +class ExecutableChangedEvent(Event): ... + _ET = TypeVar("_ET", bound=Event | Breakpoint | None) @final class EventRegistry(Generic[_ET]): def connect(self, object: Callable[[_ET], object], /) -> None: ... def disconnect(self, object: Callable[[_ET], object], /) -> None: ... + +class ValuePrinter: ... + +def blocked_signals(): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/__init__.pyi new file mode 100644 index 000000000000..2eb66f91e63a --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/__init__.pyi @@ -0,0 +1,13 @@ +from typing import Any + +class Server: + def __init__(self, in_stream, out_stream, child_stream) -> None: ... + def main_loop(self) -> None: ... + def send_event(self, event: str, body: Any | None = None) -> None: ... # body is an arbitrary object + def send_event_later(self, event: str, body: Any | None = None) -> None: ... # body is an arbitrary object + def shutdown(self) -> None: ... + +def pre_command_loop() -> None: ... +def run() -> None: ... + +session_started: bool diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/breakpoint.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/breakpoint.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/breakpoint.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/bt.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/bt.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/bt.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/disassemble.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/disassemble.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/disassemble.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/evaluate.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/evaluate.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/evaluate.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/events.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/events.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/events.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/frames.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/frames.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/frames.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/io.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/io.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/io.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/launch.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/launch.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/launch.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/locations.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/locations.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/locations.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/memory.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/memory.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/memory.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/modules.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/modules.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/modules.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/next.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/next.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/next.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/pause.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/pause.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/pause.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/scopes.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/scopes.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/scopes.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/server.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/server.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/server.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/sources.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/sources.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/sources.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/startup.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/startup.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/startup.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/state.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/state.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/state.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/threads.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/threads.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/threads.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/typecheck.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/typecheck.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/typecheck.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/varref.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/varref.pyi new file mode 100644 index 000000000000..0f6820f054ea --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/dap/varref.pyi @@ -0,0 +1,3 @@ +from _typeshed import Incomplete + +def __getattr__(name: str) -> Incomplete: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/disassembler.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/disassembler.pyi new file mode 100644 index 000000000000..d4fe1ae0d511 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/disassembler.pyi @@ -0,0 +1,57 @@ +from _typeshed import Incomplete +from typing import Final, final + +import gdb + +class Disassembler: + def __init__(self, name: str) -> None: ... + def __call__(self, info): ... + +class DisassembleInfo: + address: Incomplete + architecture: Incomplete + progspace: Incomplete + def __init__(self, /, *args, **kwargs) -> None: ... + def address_part(self, address) -> DisassemblerAddressPart: ... + def is_valid(self) -> bool: ... + def read_memory(self, len, offset: int = 0): ... + def text_part(self, string, style) -> DisassemblerTextPart: ... + +class DisassemblerPart: + def __init__(self, /, *args, **kwargs) -> None: ... + +@final +class DisassemblerAddressPart(DisassemblerPart): + address: Incomplete + string: str + +@final +class DisassemblerTextPart(DisassemblerPart): + string: str + style: Incomplete + +@final +class DisassemblerResult: + def __init__(self, /, *args, **kwargs) -> None: ... + length: Incomplete + parts: Incomplete + string: str + +STYLE_TEXT: Final = 0 +STYLE_MNEMONIC: Final = 1 +STYLE_SUB_MNEMONIC: Final = 2 +STYLE_ASSEMBLER_DIRECTIVE: Final = 3 +STYLE_REGISTER: Final = 4 +STYLE_IMMEDIATE: Final = 5 +STYLE_ADDRESS: Final = 6 +STYLE_ADDRESS_OFFSET: Final = 7 +STYLE_SYMBOL: Final = 8 +STYLE_COMMENT_START: Final = 9 + +def builtin_disassemble(INFO: DisassembleInfo, MEMORY_SOURCE: Incomplete | None = None) -> None: ... + +class maint_info_py_disassemblers_cmd(gdb.Command): + def __init__(self) -> None: ... + def invoke(self, args, from_tty): ... + +def register_disassembler(disassembler: type[Disassembler], architecture: str | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/events.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/events.pyi index 2608b503ba1c..fab42e4fb73b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/events.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/events.pyi @@ -1,64 +1,24 @@ -from typing_extensions import TypeAlias - import gdb -ContinueEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ContinueEvent] - -cont: ContinueEventRegistry - -ExitedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ExitedEvent] - -exited: ExitedEventRegistry - -StopEventRegistry: TypeAlias = gdb.EventRegistry[gdb.StopEvent] - -stop: StopEventRegistry - -NewObjFileEventRegistry: TypeAlias = gdb.EventRegistry[gdb.NewObjFileEvent] - -new_objfile: NewObjFileEventRegistry - -ClearObjFilesEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ClearObjFilesEvent] - -clear_objfiles: ClearObjFilesEventRegistry - -InferiorCallEventRegistry: TypeAlias = gdb.EventRegistry[gdb._InferiorCallEvent] - -inferior_call: InferiorCallEventRegistry - -MemoryChangedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.MemoryChangedEvent] -memory_changed: MemoryChangedEventRegistry - -RegisterChangedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.RegisterChangedEvent] - -register_changed: RegisterChangedEventRegistry - -BreakpointEventRegistry: TypeAlias = gdb.EventRegistry[gdb.Breakpoint] - -breakpoint_created: BreakpointEventRegistry -breakpoint_modified: BreakpointEventRegistry -breakpoint_deleted: BreakpointEventRegistry - -BeforePromptEventRegistry: TypeAlias = gdb.EventRegistry[None] - -before_prompt: BeforePromptEventRegistry - -NewInferiorEventRegistry: TypeAlias = gdb.EventRegistry[gdb.NewInferiorEvent] - -new_inferior: NewInferiorEventRegistry - -InferiorDeletedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.InferiorDeletedEvent] - -inferior_deleted: InferiorDeletedEventRegistry - -NewThreadEventRegistry: TypeAlias = gdb.EventRegistry[gdb.NewThreadEvent] - -new_thread: NewThreadEventRegistry - -GdbExitingEventRegistry: TypeAlias = gdb.EventRegistry[gdb.GdbExitingEvent] - -gdb_exiting: GdbExitingEventRegistry - -ConnectionEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ConnectionEvent] - -connection_removed: ConnectionEventRegistry +cont: gdb.EventRegistry[gdb.ContinueEvent] +exited: gdb.EventRegistry[gdb.ExitedEvent] +thread_exited: gdb.EventRegistry[gdb.ThreadExitedEvent] +stop: gdb.EventRegistry[gdb.StopEvent] +new_objfile: gdb.EventRegistry[gdb.NewObjFileEvent] +free_objfile: gdb.EventRegistry[gdb.FreeObjFileEvent] +clear_objfiles: gdb.EventRegistry[gdb.ClearObjFilesEvent] +new_progspace: gdb.EventRegistry[gdb.NewProgspaceEvent] +free_progspace: gdb.EventRegistry[gdb.FreeProgspaceEvent] +inferior_call: gdb.EventRegistry[gdb._InferiorCallEvent] +memory_changed: gdb.EventRegistry[gdb.MemoryChangedEvent] +register_changed: gdb.EventRegistry[gdb.RegisterChangedEvent] +breakpoint_created: gdb.EventRegistry[gdb.Breakpoint] +breakpoint_modified: gdb.EventRegistry[gdb.Breakpoint] +breakpoint_deleted: gdb.EventRegistry[gdb.Breakpoint] +before_prompt: gdb.EventRegistry[None] +new_inferior: gdb.EventRegistry[gdb.NewInferiorEvent] +inferior_deleted: gdb.EventRegistry[gdb.InferiorDeletedEvent] +new_thread: gdb.EventRegistry[gdb.NewThreadEvent] +gdb_exiting: gdb.EventRegistry[gdb.GdbExitingEvent] +connection_removed: gdb.EventRegistry[gdb.ConnectionEvent] +executable_changed: gdb.EventRegistry[gdb.ExecutableChangedEvent] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/missing_debug.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/missing_debug.pyi new file mode 100644 index 000000000000..81f716da27fa --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/missing_debug.pyi @@ -0,0 +1,12 @@ +from _typeshed import Incomplete + +import gdb + +class MissingDebugHandler: + @property + def name(self) -> str: ... + enabled: bool + def __init__(self, name: str) -> None: ... + def __call__(self, objfile: gdb.Objfile) -> bool | str | None: ... + +def register_handler(locus: Incomplete | None, handler: MissingDebugHandler, replace: bool = False) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/printing.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/printing.pyi index 591fdd09a704..f3348f1569ae 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/printing.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/printing.pyi @@ -24,8 +24,33 @@ class RegexpCollectionPrettyPrinter(PrettyPrinter): class FlagEnumerationPrinter(PrettyPrinter): def __init__(self, enum_type: str) -> None: ... +class NoOpArrayPrinter(gdb.ValuePrinter): + def __init__(self, ty, value) -> None: ... + def child(self, i): ... + def children(self): ... + def display_hint(self): ... + def num_children(self): ... + def to_string(self) -> str: ... + +class NoOpPointerReferencePrinter(gdb.ValuePrinter): + def __init__(self, value) -> None: ... + def child(self, i): ... + def children(self): ... + def num_children(self): ... + def to_string(self) -> str: ... + +class NoOpScalarPrinter(gdb.ValuePrinter): + def __init__(self, value) -> None: ... + def to_string(self) -> str: ... + +class NoOpStructPrinter(gdb.ValuePrinter): + def __init__(self, ty, value) -> None: ... + def children(self): ... + def to_string(self) -> str: ... + def register_pretty_printer( obj: gdb.Objfile | gdb.Progspace | None, printer: PrettyPrinter | Callable[[gdb.Value], gdb._PrettyPrinter | None], replace: bool = ..., ) -> None: ... +def make_visualizer(value: gdb.Value): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/unwinder.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/unwinder.pyi index 016707ce41cf..8d9fdd0143e3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/unwinder.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gdb/gdb/unwinder.pyi @@ -1,8 +1,18 @@ import gdb from gdb import Frame, UnwindInfo +class FrameId: + def __init__(self, sp: gdb.Value | int, pc: gdb.Value | int, special: gdb.Value | int | None = None) -> None: ... + @property + def pc(self) -> gdb.Value | int: ... + @property + def sp(self) -> gdb.Value | int: ... + @property + def special(self) -> gdb.Value | int | None: ... + class Unwinder: - name: str + @property + def name(self) -> str: ... enabled: bool def __init__(self, name: str) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gevent/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/gevent/METADATA.toml index c956c3743f5c..1db1f9d5c3b6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gevent/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/gevent/METADATA.toml @@ -1,4 +1,4 @@ -version = "24.2.*" +version = "24.10.*" upstream_repository = "https://github.com/gevent/gevent" requires = ["types-greenlet", "types-psutil"] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/__init__.pyi similarity index 86% rename from packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey.pyi rename to packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/__init__.pyi index 57c992e942c9..d7ccf4f2822a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/__init__.pyi @@ -1,12 +1,11 @@ -from types import ModuleType from typing import Any +from gevent.monkey.api import get_original as get_original, patch_module as patch_module + class MonkeyPatchWarning(RuntimeWarning): ... def is_module_patched(mod_name: str) -> bool: ... def is_object_patched(mod_name: str, item_name: str) -> bool: ... -def get_original(mod_name: str, item_name: str) -> Any: ... -def patch_module(target_module: ModuleType, source_module: ModuleType, items: list[str] | None = None) -> bool: ... def patch_os() -> None: ... def patch_queue() -> None: ... def patch_time() -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/api.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/api.pyi new file mode 100644 index 000000000000..130687dec5c0 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/monkey/api.pyi @@ -0,0 +1,7 @@ +from types import ModuleType +from typing import Any + +def get_original(mod_name: str, item_name: str) -> Any: ... +def patch_item(module: ModuleType, attr: str, newitem: object) -> None: ... +def remove_item(module: ModuleType, attr: str) -> None: ... +def patch_module(target_module: ModuleType, source_module: ModuleType, items: list[str] | None = None) -> bool: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/queue.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/queue.pyi index f8327e9f23b9..515aae6f5588 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/queue.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/queue.pyi @@ -1,3 +1,4 @@ +import sys from collections import deque from collections.abc import Iterable @@ -9,7 +10,12 @@ from typing_extensions import Self from gevent._waiter import Waiter from gevent.hub import Hub -__all__ = ["Queue", "PriorityQueue", "LifoQueue", "SimpleQueue", "JoinableQueue", "Channel", "Empty", "Full"] +__all__ = ["Queue", "PriorityQueue", "LifoQueue", "SimpleQueue", "JoinableQueue", "Channel", "Empty", "Full", "ShutDown"] + +if sys.version_info >= (3, 13): + from queue import ShutDown as ShutDown +else: + class ShutDown(Exception): ... _T = TypeVar("_T") @@ -19,6 +25,7 @@ class Queue(Generic[_T]): @property def queue(self) -> deque[_T]: ... # readonly in Cython maxsize: int | None + is_shutdown: bool @overload def __init__(self, maxsize: int | None = None) -> None: ... @overload @@ -35,6 +42,7 @@ class Queue(Generic[_T]): def put(self, item: _T, block: bool = True, timeout: float | None = None) -> None: ... def put_nowait(self, item: _T) -> None: ... def qsize(self) -> int: ... + def shutdown(self, immediate: bool = False) -> None: ... def __bool__(self) -> bool: ... def __iter__(self) -> Self: ... def __len__(self) -> int: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/timeout.pyi b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/timeout.pyi index 341fd2479f1a..9e7bf5e4c36b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/timeout.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/gevent/gevent/timeout.pyi @@ -1,6 +1,6 @@ from collections.abc import Callable from types import TracebackType -from typing import Any, Literal, TypeVar, overload +from typing import Any, Literal, Protocol, TypeVar, overload from typing_extensions import ParamSpec, Self from gevent._types import _TimerWatcher @@ -11,6 +11,10 @@ _T2 = TypeVar("_T2") _TimeoutT = TypeVar("_TimeoutT", bound=Timeout) _P = ParamSpec("_P") +class _HasSeconds(Protocol): + @property + def seconds(self) -> float | int: ... + class Timeout(BaseException): seconds: float | None exception: type[BaseException] | BaseException | None @@ -39,6 +43,7 @@ class Timeout(BaseException): def __exit__( self, typ: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None ) -> Literal[True] | None: ... + def __lt__(self, other: _HasSeconds | float) -> bool: ... # when timeout_value is provided we unfortunately get no type checking on *args, **kwargs, because # ParamSpec does not allow mixing in additional keyword arguments diff --git a/packages/pyright-internal/typeshed-fallback/stubs/html5lib/html5lib/serializer.pyi b/packages/pyright-internal/typeshed-fallback/stubs/html5lib/html5lib/serializer.pyi index 5e230a05c282..12ae9db51fa4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/html5lib/html5lib/serializer.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/html5lib/html5lib/serializer.pyi @@ -1,4 +1,5 @@ from _typeshed import Incomplete +from collections.abc import Generator from typing import Any, overload def htmlentityreplace_errors(exc: Exception) -> tuple[str | bytes, int]: ... @@ -31,7 +32,7 @@ class HTMLSerializer: def encode(self, string): ... def encodeStrict(self, string): ... encoding: Any - def serialize(self, treewalker, encoding: Incomplete | None = None) -> None: ... + def serialize(self, treewalker, encoding: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... def render(self, treewalker, encoding: Incomplete | None = None): ... def serializeError(self, data: str = "XXX ERROR MESSAGE NEEDED") -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi index 3f8daf59c1c2..7aa257843278 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi @@ -5,6 +5,8 @@ from .cal import ( ComponentFactory as ComponentFactory, Event as Event, FreeBusy as FreeBusy, + IncompleteComponent as IncompleteComponent, + InvalidCalendar as InvalidCalendar, Journal as Journal, Timezone as Timezone, TimezoneDaylight as TimezoneDaylight, @@ -25,6 +27,7 @@ from .prop import ( vFrequency as vFrequency, vGeo as vGeo, vInt as vInt, + vMonth as vMonth, vPeriod as vPeriod, vRecur as vRecur, vText as vText, @@ -81,4 +84,7 @@ __all__ = [ "version_tuple", "TypesFactory", "Component", + "vMonth", + "IncompleteComponent", + "InvalidCalendar", ] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi b/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi index 6e21942c61d8..2b1b1542f0c8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/icalendar/icalendar/cal.pyi @@ -2,6 +2,7 @@ import datetime from _typeshed import Incomplete, SupportsItems from collections.abc import Callable from typing import Any, ClassVar, Final, Literal, overload +from typing_extensions import TypeIs from .caselessdict import CaselessDict from .parser import Contentline, Contentlines @@ -22,6 +23,8 @@ __all__ = [ "Todo", "component_factory", "get_example", + "IncompleteComponent", + "InvalidCalendar", ] def get_example(component_directory: str, example_name: str) -> bytes: ... @@ -31,6 +34,9 @@ class ComponentFactory(CaselessDict[Incomplete]): INLINE: CaselessDict[int] +class InvalidCalendar(ValueError): ... +class IncompleteComponent(ValueError): ... + class Component(CaselessDict[Incomplete]): name: ClassVar[str | None] required: ClassVar[tuple[str, ...]] @@ -71,16 +77,54 @@ class Component(CaselessDict[Incomplete]): def to_ical(self, sorted: bool = True) -> bytes: ... def __eq__(self, other: Component) -> bool: ... # type: ignore[override] +# type_def is a TypeForm +def create_single_property(prop: str, value_attr: str, value_type: tuple[type, ...], type_def: Any, doc: str) -> property: ... +def is_date(dt: datetime.date) -> bool: ... # TypeIs[datetime.date and not datetime.datetime] +def is_datetime(dt: datetime.date) -> TypeIs[datetime.datetime]: ... + class Event(Component): name: ClassVar[Literal["VEVENT"]] @classmethod def example(cls, name: str) -> Event: ... + @property + def DTSTART(self) -> datetime.date | datetime.datetime | None: ... + @DTSTART.setter + def DTSTART(self, value: datetime.date | datetime.datetime | None) -> None: ... + @property + def DTEND(self) -> datetime.date | datetime.datetime | None: ... + @DTEND.setter + def DTEND(self, value: datetime.date | datetime.datetime | None) -> None: ... + @property + def DURATION(self) -> datetime.timedelta | None: ... + @DURATION.setter + def DURATION(self, value: datetime.timedelta | None) -> None: ... + @property + def duration(self) -> datetime.timedelta: ... + @property + def start(self) -> datetime.date | datetime.datetime: ... + @start.setter + def start(self, value: datetime.date | datetime.datetime | None) -> None: ... + @property + def end(self) -> datetime.date | datetime.datetime: ... + @end.setter + def end(self, value: datetime.date | datetime.datetime | None) -> None: ... class Todo(Component): name: ClassVar[Literal["VTODO"]] class Journal(Component): name: ClassVar[Literal["VJOURNAL"]] + @property + def DTSTART(self) -> datetime.date | datetime.datetime | None: ... + @DTSTART.setter + def DTSTART(self, value: datetime.date | datetime.datetime | None) -> None: ... + @property + def start(self) -> datetime.date | datetime.datetime: ... + @start.setter + def start(self, value: datetime.date | datetime.datetime | None) -> None: ... + end = start + @property + def duration(self) -> datetime.timedelta: ... class FreeBusy(Component): name: ClassVar[Literal["VFREEBUSY"]] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/networkx/METADATA.toml index ace417a7f4e0..ceb9213e979c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/METADATA.toml @@ -1,4 +1,4 @@ -version = "3.2.1" +version = "3.3" upstream_repository = "https://github.com/networkx/networkx" # requires a version of numpy with a `py.typed` file # see https://github.com/python/typeshed/issues/12551 diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/__init__.pyi index 86bd7edf3f2f..7e5d6b1ec86a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/__init__.pyi @@ -10,7 +10,7 @@ from networkx.lazy_imports import _lazy_import as _lazy_import from networkx.linalg import * from networkx.readwrite import * from networkx.relabel import * -from networkx.utils.backends import _dispatch as _dispatch +from networkx.utils import _clear_cache as _clear_cache, _dispatchable as _dispatchable, config as config from . import ( algorithms as algorithms, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clique.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clique.pyi index 1ea7793c4264..886ec93f7c02 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clique.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clique.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def maximum_independent_set(G): ... -@_dispatch +@_dispatchable def max_clique(G): ... -@_dispatch +@_dispatchable def clique_removal(G): ... -@_dispatch +@_dispatchable def large_clique_size(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi index eb18de1188dc..b18a813d1192 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def average_clustering(G, trials: int = 1000, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi index 886607817517..8a431a9acb00 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def local_node_connectivity(G, source, target, cutoff: Incomplete | None = None): ... -@_dispatch +@_dispatchable def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None): ... -@_dispatch +@_dispatchable def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, cutoff: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi index 136d0b8d133d..75b45b52003e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def diameter(G, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi index d7ecd98b5c61..b08dc451db96 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def min_weighted_dominating_set(G, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def min_edge_dominating_set(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi index 7ede5c764063..46d89ff537d3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def k_components(G, min_density: float = 0.95): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/matching.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/matching.pyi index d4c8b8a8bd0b..310ef31b91bf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/matching.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/matching.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def min_maximal_matching(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi index b3a63ccca690..760c114b4a41 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def randomized_partitioning(G, seed: Incomplete | None = None, p: float = 0.5, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def one_exchange(G, initial_cut: Incomplete | None = None, seed: Incomplete | None = None, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi index e94877bea1a8..5b85df65d7bb 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def ramsey_R2(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi index 8ade9c0e5209..03d0f6742be6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def metric_closure(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def steiner_tree(G, terminal_nodes, weight: str = "weight", method: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi index 9ceb4349d7c5..e44e31519d14 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi @@ -1,18 +1,18 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def christofides(G, weight: str = "weight", tree: Incomplete | None = None): ... -@_dispatch +@_dispatchable def traveling_salesman_problem( - G, weight: str = "weight", nodes: Incomplete | None = None, cycle: bool = True, method: Incomplete | None = None + G, weight: str = "weight", nodes: Incomplete | None = None, cycle: bool = True, method: Incomplete | None = None, **kwargs ): ... -@_dispatch +@_dispatchable def asadpour_atsp(G, weight: str = "weight", seed: Incomplete | None = None, source: Incomplete | None = None): ... -@_dispatch +@_dispatchable def greedy_tsp(G, weight: str = "weight", source: Incomplete | None = None): ... -@_dispatch +@_dispatchable def simulated_annealing_tsp( G, init_cycle, @@ -26,7 +26,7 @@ def simulated_annealing_tsp( alpha: float = 0.01, seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def threshold_accepting_tsp( G, init_cycle, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/treewidth.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/treewidth.pyi index 689661866911..5a68247f5b49 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/treewidth.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/treewidth.pyi @@ -1,12 +1,12 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["treewidth_min_degree", "treewidth_min_fill_in"] -@_dispatch +@_dispatchable def treewidth_min_degree(G): ... -@_dispatch +@_dispatchable def treewidth_min_fill_in(G): ... class MinDegreeHeuristic: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi index 1e903f20611a..22c5787bf983 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def min_weighted_vertex_cover(G, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi index f317998a9cf9..36c7f64e46e2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def average_degree_connectivity( G, source: str = "in+out", target: str = "in+out", nodes: Incomplete | None = None, weight: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi index 8904cc1560a4..dec6b0595556 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi @@ -1,16 +1,16 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def degree_assortativity_coefficient( G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def degree_pearson_correlation_coefficient( G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def attribute_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def numeric_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi index 95402642c66c..06e19e1f68d5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi @@ -1,18 +1,18 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def attribute_mixing_dict(G, attribute, nodes: Incomplete | None = None, normalized: bool = False): ... -@_dispatch +@_dispatchable def attribute_mixing_matrix( G, attribute, nodes: Incomplete | None = None, mapping: Incomplete | None = None, normalized: bool = True ): ... -@_dispatch +@_dispatchable def degree_mixing_dict( G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None, normalized: bool = False ): ... -@_dispatch +@_dispatchable def degree_mixing_matrix( G, x: str = "out", @@ -22,5 +22,5 @@ def degree_mixing_matrix( normalized: bool = True, mapping: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def mixing_dict(xy, normalized: bool = False): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi index 7f0e945ff696..6cc1b1322d2a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def average_neighbor_degree( G, source: str = "out", target: str = "out", nodes: Incomplete | None = None, weight: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi index d73234043145..569d52653ee5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def node_attribute_xy(G, attribute, nodes: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def node_degree_xy( G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None ) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/asteroidal.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/asteroidal.pyi index 07fa9c4a91ad..4d12ecadaecd 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/asteroidal.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/asteroidal.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def find_asteroidal_triple(G): ... -@_dispatch +@_dispatchable def is_at_free(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/basic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/basic.pyi index cf30841b617c..f7fd955bb524 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/basic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/basic.pyi @@ -1,16 +1,16 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def color(G): ... -@_dispatch +@_dispatchable def is_bipartite(G): ... -@_dispatch +@_dispatchable def is_bipartite_node_set(G, nodes): ... -@_dispatch +@_dispatchable def sets(G, top_nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def density(B, nodes): ... -@_dispatch +@_dispatchable def degrees(B, nodes, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi index 9008090200c5..9d011ac139c2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi @@ -1,8 +1,8 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def degree_centrality(G, nodes): ... -@_dispatch +@_dispatchable def betweenness_centrality(G, nodes): ... -@_dispatch +@_dispatchable def closeness_centrality(G, nodes, normalized: bool = True): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi index e8f427123ebc..e6d15445c985 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def latapy_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ... clustering = latapy_clustering -@_dispatch +@_dispatchable def average_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ... -@_dispatch +@_dispatchable def robins_alexander_clustering(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/covering.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/covering.pyi index 1c07f6ee0c5f..521e6d4956af 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/covering.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/covering.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi index 04d79f515a8d..009222121126 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def write_edgelist(G, path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8") -> None: ... -@_dispatch +@_dispatchable def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def parse_edgelist( lines, comments: str = "#", @@ -16,7 +16,7 @@ def parse_edgelist( nodetype: Incomplete | None = None, data: bool = True, ): ... -@_dispatch +@_dispatchable def read_edgelist( path, comments: str = "#", diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/generators.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/generators.pyi index d422ac358d0f..9e1914567a50 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/generators.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/generators.pyi @@ -1,20 +1,20 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def complete_bipartite_graph(n1, n2, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def configuration_model(aseq, bseq, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def reverse_havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def alternating_havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def preferential_attachment_graph(aseq, p, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_graph(n, m, p, seed: Incomplete | None = None, directed: bool = False): ... -@_dispatch +@_dispatchable def gnmk_random_graph(n, m, k, seed: Incomplete | None = None, directed: bool = False): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matching.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matching.pyi index b6a2852651d0..a731c33b88d2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matching.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matching.pyi @@ -1,15 +1,15 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def hopcroft_karp_matching(G, top_nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def eppstein_matching(G, top_nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def to_vertex_cover(G, matching, top_nodes: Incomplete | None = None): ... maximum_matching = hopcroft_karp_matching -@_dispatch +@_dispatchable def minimum_weight_full_matching(G, top_nodes: Incomplete | None = None, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi index e7d8e399f40f..51a032fff0d8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def biadjacency_matrix( G, row_order, @@ -11,5 +11,5 @@ def biadjacency_matrix( weight: str = "weight", format: str = "csr", ): ... -@_dispatch +@_dispatchable def from_biadjacency_matrix(A, create_using: Incomplete | None = None, edge_attribute: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/projection.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/projection.pyi index 73f12dc57843..37712b7840a4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/projection.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/projection.pyi @@ -1,14 +1,14 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def projected_graph(B, nodes, multigraph: bool = False): ... -@_dispatch +@_dispatchable def weighted_projected_graph(B, nodes, ratio: bool = False): ... -@_dispatch +@_dispatchable def collaboration_weighted_projected_graph(B, nodes): ... -@_dispatch +@_dispatchable def overlap_weighted_projected_graph(B, nodes, jaccard: bool = True): ... -@_dispatch +@_dispatchable def generic_weighted_projected_graph(B, nodes, weight_function: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi index 5501fd2d8d25..8c66512fc95a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def node_redundancy(G, nodes: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi index 435a1795cff7..4a81f118acbf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def spectral_bipartivity(G, nodes: Incomplete | None = None, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/boundary.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/boundary.pyi index 51c8c9031608..3b5cfa511a38 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/boundary.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/boundary.pyi @@ -3,7 +3,7 @@ from collections.abc import Generator, Iterable from typing import Literal, TypeVar, overload from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable _U = TypeVar("_U") @@ -111,5 +111,5 @@ def edge_boundary( keys: Literal[True], default: _U | None = None, ) -> Generator[tuple[_Node, _Node, int, dict[str, _U]], None, None]: ... -@_dispatch +@_dispatchable def node_boundary(G: Graph[_Node], nbunch1: Iterable[_Node], nbunch2: Iterable[_Node] | None = None) -> set[_Node]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bridges.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bridges.pyi index 2d94a35f4925..35fa914d6f90 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bridges.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/bridges.pyi @@ -3,11 +3,11 @@ from collections.abc import Callable, Generator from typing import Literal, overload from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def bridges(G: Graph[_Node], root: _Node | None = None) -> Generator[_Node, None, None]: ... -@_dispatch +@_dispatchable def has_bridges(G: Graph[_Node], root: Incomplete | None = None) -> bool: ... @overload def local_bridges( diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/broadcasting.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/broadcasting.pyi new file mode 100644 index 000000000000..e61d77b28e7c --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/broadcasting.pyi @@ -0,0 +1,9 @@ +import networkx as nx +from networkx.classes.graph import Graph, _Node + +__all__ = ["tree_broadcast_center", "tree_broadcast_time"] + +@nx._dispatchable +def tree_broadcast_center(G: Graph[_Node]) -> tuple[int, set[_Node]]: ... +@nx._dispatchable +def tree_broadcast_time(G: Graph[_Node], node: int | None = None) -> int: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi index d69156f653be..5475cfecb789 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete from networkx.classes.graph import Graph, _Edge, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable from numpy.random import RandomState -@_dispatch +@_dispatchable def betweenness_centrality( G: Graph[_Node], k: int | None = None, @@ -13,7 +13,7 @@ def betweenness_centrality( endpoints: bool = False, seed: int | RandomState | None = None, ) -> dict[_Node, float]: ... -@_dispatch +@_dispatchable def edge_betweenness_centrality( G: Graph[_Node], k: int | None = None, normalized: bool = True, weight: str | None = None, seed: Incomplete | None = None ) -> dict[_Edge[_Node], float]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi index d1c012c8eb4e..66abb8533ad4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi @@ -1,13 +1,13 @@ from collections.abc import Iterable from networkx.classes.graph import Graph, _Edge, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def betweenness_centrality_subset( G: Graph[_Node], sources: Iterable[_Node], targets: Iterable[_Node], normalized: bool = False, weight: str | None = None ) -> dict[_Node, float]: ... -@_dispatch +@_dispatchable def edge_betweenness_centrality_subset( G: Graph[_Node], sources: Iterable[_Node], targets: Iterable[_Node], normalized: bool = False, weight: str | None = None ) -> dict[_Edge[_Node], float]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/closeness.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/closeness.pyi index e682d7ce8afc..210e88bc7218 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/closeness.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/closeness.pyi @@ -1,13 +1,13 @@ from _typeshed import SupportsKeysAndGetItem from networkx.classes.graph import Graph, _Edge, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def closeness_centrality( G: Graph[_Node], u: _Node | None = None, distance: str | None = None, wf_improved: bool = True ) -> dict[_Node, float]: ... -@_dispatch +@_dispatchable def incremental_closeness_centrality( G: Graph[_Node], edge: _Edge[_Node], diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi index ec6506d563d2..612702be5b69 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def approximate_current_flow_betweenness_centrality( G, normalized: bool = True, @@ -13,11 +13,11 @@ def approximate_current_flow_betweenness_centrality( kmax: int = 10000, seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def current_flow_betweenness_centrality( G, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "full" ): ... -@_dispatch +@_dispatchable def edge_current_flow_betweenness_centrality( G, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "full" ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi index 65eaa77652f1..a34c8461d5c4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi @@ -1,12 +1,12 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def current_flow_betweenness_centrality_subset( G, sources, targets, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "lu" ): ... -@_dispatch +@_dispatchable def edge_current_flow_betweenness_centrality_subset( G, sources, targets, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "lu" ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi index 0269117b26e1..81587a748915 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def current_flow_closeness_centrality(G, weight: Incomplete | None = None, dtype=..., solver: str = "lu"): ... information_centrality = current_flow_closeness_centrality diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi index 94013e3182d2..30618e780bfe 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/degree_alg.pyi @@ -1,9 +1,9 @@ from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ... -@_dispatch +@_dispatchable def in_degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ... -@_dispatch +@_dispatchable def out_degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi index c0550d148ee3..b673beb8778b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/dispersion.pyi @@ -1,7 +1,7 @@ from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def dispersion( G: Graph[_Node], u: _Node | None = None, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi index f74d25fb6fc0..cb0736e69f93 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def eigenvector_centrality( G, max_iter: int = 100, tol: float = 1e-06, nstart: Incomplete | None = None, weight: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def eigenvector_centrality_numpy(G, weight: Incomplete | None = None, max_iter: int = 50, tol: float = 0): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi index f1e49b1787de..12a98580dbde 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi @@ -1,9 +1,9 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def flow_matrix_row(G, weight: Incomplete | None = None, dtype=..., solver: str = "lu") -> Generator[Incomplete, None, None]: ... class InverseLaplacian: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/group.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/group.pyi index 8431e09540e9..a7cfa7a7c58a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/group.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/group.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def group_betweenness_centrality(G, C, normalized: bool = True, weight: Incomplete | None = None, endpoints: bool = False): ... -@_dispatch +@_dispatchable def prominent_group( G, k, @@ -14,11 +14,11 @@ def prominent_group( normalized: bool = True, greedy: bool = False, ): ... -@_dispatch +@_dispatchable def group_closeness_centrality(G, S, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def group_degree_centrality(G, S): ... -@_dispatch +@_dispatchable def group_in_degree_centrality(G, S): ... -@_dispatch +@_dispatchable def group_out_degree_centrality(G, S): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi index 22b1b8458aaa..cd2aa8ca1747 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def harmonic_centrality( G, nbunch: Incomplete | None = None, distance: Incomplete | None = None, sources: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/katz.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/katz.pyi index 7ad4c1ed9e41..509456ff0ef9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/katz.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/katz.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def katz_centrality( G, alpha: float = 0.1, @@ -13,7 +13,7 @@ def katz_centrality( normalized: bool = True, weight: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def katz_centrality_numpy( G, alpha: float = 0.1, beta: float = 1.0, normalized: bool = True, weight: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi index 1d29b3c99ab3..a1a79318dcb2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def laplacian_centrality( G, normalized: bool = True, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/load.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/load.pyi index 66508d057057..a3cb20b97eae 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/load.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/load.pyi @@ -1,15 +1,15 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["load_centrality", "edge_load_centrality"] -@_dispatch +@_dispatchable def newman_betweenness_centrality( G, v: Incomplete | None = None, cutoff: Incomplete | None = None, normalized: bool = True, weight: Incomplete | None = None ): ... load_centrality = newman_betweenness_centrality -@_dispatch +@_dispatchable def edge_load_centrality(G, cutoff: bool = False): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/percolation.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/percolation.pyi index 42431fed2524..b64230f68108 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/percolation.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/percolation.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def percolation_centrality( G, attribute: str = "percolation", states: Incomplete | None = None, weight: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/reaching.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/reaching.pyi index 69d2017c1251..4cb0a9ef7a59 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/reaching.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/reaching.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def global_reaching_centrality(G, weight: Incomplete | None = None, normalized: bool = True): ... -@_dispatch +@_dispatchable def local_reaching_centrality( G, v, paths: Incomplete | None = None, weight: Incomplete | None = None, normalized: bool = True ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/second_order.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/second_order.pyi index 3bbf8e2e66f2..32f37fabeabf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/second_order.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/second_order.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def second_order_centrality(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi index e7969b808888..f826a0b38022 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def subgraph_centrality_exp(G): ... -@_dispatch +@_dispatchable def subgraph_centrality(G): ... -@_dispatch +@_dispatchable def communicability_betweenness_centrality(G): ... -@_dispatch +@_dispatchable def estrada_index(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/trophic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/trophic.pyi index 64e801df8f9c..efbd8e54f2a6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/trophic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/trophic.pyi @@ -1,8 +1,8 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def trophic_levels(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def trophic_differences(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def trophic_incoherence_parameter(G, weight: str = "weight", cannibalism: bool = False): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi index 3b529cee2603..c25d90ce7ea2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def voterank(G, number_of_nodes: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chains.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chains.pyi index 90cd6fe607f1..e7f99119c9d4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chains.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chains.pyi @@ -1,7 +1,7 @@ from collections.abc import Generator from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def chain_decomposition(G: Graph[_Node], root: _Node | None = None) -> Generator[list[tuple[_Node, _Node]], None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi index c14b405387ce..ba37c5b35b58 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi @@ -3,15 +3,15 @@ from collections.abc import Generator, Hashable from networkx.classes.graph import Graph, _Node from networkx.exception import NetworkXException -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class NetworkXTreewidthBoundExceeded(NetworkXException): ... -@_dispatch +@_dispatchable def is_chordal(G: Graph[Hashable]) -> bool: ... -@_dispatch +@_dispatchable def find_induced_nodes(G: Graph[_Node], s: _Node, t: _Node, treewidth_bound: float = sys.maxsize) -> set[_Node]: ... -@_dispatch +@_dispatchable def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node], None, None]: ... -@_dispatch +@_dispatchable def chordal_graph_treewidth(G: Graph[Hashable]) -> int: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi index 3bae47633ac4..e7409ca915d8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi @@ -3,17 +3,17 @@ from collections.abc import Generator, Iterable, Iterator, Sized from typing import overload from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def enumerate_all_cliques(G: Graph[_Node]) -> Generator[list[_Node], None, None]: ... -@_dispatch +@_dispatchable def find_cliques(G: Graph[_Node], nodes: SupportsGetItem[slice, _Node] | None = None) -> Generator[list[_Node], None, None]: ... -@_dispatch +@_dispatchable def find_cliques_recursive(G: Graph[_Node], nodes: SupportsGetItem[slice, _Node] | None = None) -> Iterator[list[_Node]]: ... -@_dispatch +@_dispatchable def make_max_clique_graph(G: Graph[_Node], create_using: type[Graph[_Node]] | None = None) -> Graph[_Node]: ... -@_dispatch +@_dispatchable def make_clique_bipartite( G: Graph[_Node], fpos: Unused = None, create_using: type[Graph[_Node]] | None = None, name: Unused = None ) -> Graph[_Node]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cluster.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cluster.pyi index fc4e1fb632a4..d0dc06de3ce9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cluster.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cluster.pyi @@ -1,16 +1,16 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def triangles(G, nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def average_clustering(G, nodes: Incomplete | None = None, weight: Incomplete | None = None, count_zeros: bool = True): ... -@_dispatch +@_dispatchable def clustering(G, nodes: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def transitivity(G): ... -@_dispatch +@_dispatchable def square_clustering(G, nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def generalized_degree(G, nodes: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi index 866e127d9b5b..94f61af53c5b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def equitable_color(G, num_colors): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi index aaaac626f5fb..26b8767083d0 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = [ "greedy_color", @@ -15,23 +15,23 @@ __all__ = [ "strategy_smallest_last", ] -@_dispatch +@_dispatchable def strategy_largest_first(G, colors): ... -@_dispatch +@_dispatchable def strategy_random_sequential(G, colors, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def strategy_smallest_last(G, colors): ... -@_dispatch +@_dispatchable def strategy_independent_set(G, colors) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def strategy_connected_sequential_bfs(G, colors): ... -@_dispatch +@_dispatchable def strategy_connected_sequential_dfs(G, colors): ... -@_dispatch +@_dispatchable def strategy_connected_sequential(G, colors, traversal: str = "bfs") -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def strategy_saturation_largest_first(G, colors) -> Generator[Incomplete, None, Incomplete]: ... -@_dispatch +@_dispatchable def greedy_color(G, strategy: str = "largest_first", interchange: bool = False): ... class _Node: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/communicability_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/communicability_alg.pyi index 55ab8cd05c8e..9eede08f8535 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/communicability_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/communicability_alg.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def communicability(G): ... -@_dispatch +@_dispatchable def communicability_exp(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/__init__.pyi index 88597e70592d..fd1d0c644e3f 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/__init__.pyi @@ -1,6 +1,7 @@ from networkx.algorithms.community.asyn_fluid import * from networkx.algorithms.community.centrality import * from networkx.algorithms.community.community_utils import * +from networkx.algorithms.community.divisive import * from networkx.algorithms.community.kclique import * from networkx.algorithms.community.kernighan_lin import * from networkx.algorithms.community.label_propagation import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi index 2604518ddf19..d78fdc2db5e5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def asyn_fluidc(G, k, max_iter: int = 100, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/centrality.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/centrality.pyi index 715fa70134ef..b6b2712c1f62 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/centrality.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/centrality.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def girvan_newman(G, most_valuable_edge: Incomplete | None = None) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/community_utils.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/community_utils.pyi index dc011e9a775b..882dbf8ab1bf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/community_utils.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/community_utils.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_partition(G, communities): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/divisive.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/divisive.pyi new file mode 100644 index 000000000000..6eeed32d21ab --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/divisive.pyi @@ -0,0 +1,10 @@ +from _typeshed import Incomplete + +import networkx as nx + +__all__ = ["edge_betweenness_partition", "edge_current_flow_betweenness_partition"] + +@nx._dispatchable +def edge_betweenness_partition(G, number_of_sets: int, *, weight: Incomplete | None = None) -> list[Incomplete]: ... +@nx._dispatchable +def edge_current_flow_betweenness_partition(G, number_of_sets: int, *, weight: Incomplete | None = None) -> list[Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kclique.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kclique.pyi index aebf35222a79..39bc56a86fad 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kclique.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kclique.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def k_clique_communities(G, k, cliques: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi index e8a0ad899c67..cd15c6541079 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def kernighan_lin_bisection( G, partition: Incomplete | None = None, max_iter: int = 10, weight: str = "weight", seed: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi index b3db6ac4cb2b..c79a95fd2829 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def asyn_lpa_communities( G, weight: Incomplete | None = None, seed: Incomplete | None = None ) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def label_propagation_communities(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/louvain.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/louvain.pyi index 0155ccd71ea0..e086829b451e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/louvain.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/louvain.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def louvain_communities( G, weight: str = "weight", resolution: float = 1, threshold: float = 1e-07, seed: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def louvain_partitions( G, weight: str = "weight", resolution: float = 1, threshold: float = 1e-07, seed: Incomplete | None = None ) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/lukes.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/lukes.pyi index f748adb811c0..0044043faf7c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/lukes.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/lukes.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def lukes_partitioning(G, max_size, node_weight: Incomplete | None = None, edge_weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/modularity_max.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/modularity_max.pyi index 1ac861d8a004..9842451eaba9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/modularity_max.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/modularity_max.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def greedy_modularity_communities( G, weight: Incomplete | None = None, resolution: float = 1, cutoff: int = 1, best_n: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def naive_greedy_modularity_communities(G, resolution: float = 1, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi index 2ffecb7b32e5..12f9e93f2f50 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi @@ -1,12 +1,12 @@ from networkx.exception import NetworkXError -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["modularity", "partition_quality"] class NotAPartition(NetworkXError): def __init__(self, G, collection) -> None: ... -@_dispatch +@_dispatchable def modularity(G, communities, weight: str = "weight", resolution: float = 1): ... -@_dispatch +@_dispatchable def partition_quality(G, partition): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/attracting.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/attracting.pyi index 8a6dd93e342d..93e97a4fb04d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/attracting.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/attracting.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def attracting_components(G) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def number_attracting_components(G): ... -@_dispatch +@_dispatchable def is_attracting_component(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/biconnected.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/biconnected.pyi index b7dc97487d77..1f58e5d23192 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/biconnected.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/biconnected.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_biconnected(G): ... -@_dispatch +@_dispatchable def biconnected_component_edges(G) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def biconnected_components(G) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def articulation_points(G) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/connected.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/connected.pyi index 1e1024471c82..240517110407 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/connected.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/connected.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def connected_components(G) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def number_connected_components(G): ... -@_dispatch +@_dispatchable def is_connected(G): ... -@_dispatch +@_dispatchable def node_connected_component(G, n): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/semiconnected.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/semiconnected.pyi index 179784032d95..2a65d32221aa 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/semiconnected.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/semiconnected.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_semiconnected(G, topo_order: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi index 41b77c125ddf..d510d8c03574 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi @@ -2,17 +2,17 @@ from collections.abc import Generator, Hashable, Iterable from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def strongly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ... -@_dispatch +@_dispatchable def kosaraju_strongly_connected_components(G: Graph[_Node], source: _Node | None = None) -> Generator[set[_Node], None, None]: ... -@_dispatch +@_dispatchable def strongly_connected_components_recursive(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ... -@_dispatch +@_dispatchable def number_strongly_connected_components(G: Graph[Hashable]) -> int: ... -@_dispatch +@_dispatchable def is_strongly_connected(G: Graph[Hashable]) -> bool: ... -@_dispatch +@_dispatchable def condensation(G: DiGraph[_Node], scc: Iterable[Iterable[_Node]] | None = None) -> DiGraph[int]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi index 95283d2bd83c..66c4f7b61dfe 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi @@ -1,11 +1,11 @@ from collections.abc import Generator, Hashable from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def weakly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ... -@_dispatch +@_dispatchable def number_weakly_connected_components(G: Graph[Hashable]) -> int: ... -@_dispatch +@_dispatchable def is_weakly_connected(G: Graph[Hashable]) -> bool: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/connectivity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/connectivity.pyi index 75c14803d3ed..a13069989845 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/connectivity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/connectivity.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from networkx.algorithms.flow import edmonds_karp -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = [ "average_node_connectivity", @@ -14,7 +14,7 @@ __all__ = [ default_flow_func = edmonds_karp -@_dispatch +@_dispatchable def local_node_connectivity( G, s, @@ -24,13 +24,13 @@ def local_node_connectivity( residual: Incomplete | None = None, cutoff: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ... -@_dispatch +@_dispatchable def average_node_connectivity(G, flow_func: Incomplete | None = None): ... -@_dispatch +@_dispatchable def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, flow_func: Incomplete | None = None): ... -@_dispatch +@_dispatchable def local_edge_connectivity( G, s, @@ -40,7 +40,7 @@ def local_edge_connectivity( residual: Incomplete | None = None, cutoff: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def edge_connectivity( G, s: Incomplete | None = None, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/cuts.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/cuts.pyi index 7c930100213b..44372c2d915c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/cuts.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/cuts.pyi @@ -1,21 +1,21 @@ from _typeshed import Incomplete from networkx.algorithms.flow import edmonds_karp -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["minimum_st_node_cut", "minimum_node_cut", "minimum_st_edge_cut", "minimum_edge_cut"] default_flow_func = edmonds_karp -@_dispatch +@_dispatchable def minimum_st_edge_cut( G, s, t, flow_func: Incomplete | None = None, auxiliary: Incomplete | None = None, residual: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def minimum_st_node_cut( G, s, t, flow_func: Incomplete | None = None, auxiliary: Incomplete | None = None, residual: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def minimum_node_cut(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ... -@_dispatch +@_dispatchable def minimum_edge_cut(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi index 6cca9ca6ca31..2f8fc3abe242 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi @@ -2,13 +2,13 @@ from _typeshed import Incomplete from collections.abc import Generator from networkx.algorithms.flow import edmonds_karp -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["edge_disjoint_paths", "node_disjoint_paths"] default_flow_func = edmonds_karp -@_dispatch +@_dispatchable def edge_disjoint_paths( G, s, @@ -18,7 +18,7 @@ def edge_disjoint_paths( auxiliary: Incomplete | None = None, residual: Incomplete | None = None, ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def node_disjoint_paths( G, s, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi index 133ab4460411..fe32ff99d112 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi @@ -1,13 +1,13 @@ from collections.abc import Generator, Hashable from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_k_edge_connected(G: Graph[Hashable], k: int): ... -@_dispatch +@_dispatchable def is_locally_k_edge_connected(G, s, t, k): ... -@_dispatch +@_dispatchable def k_edge_augmentation( G: Graph[_Node], k: int, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi index f0d92cc638ce..2578606fb13f 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def k_edge_components(G, k): ... -@_dispatch +@_dispatchable def k_edge_subgraphs(G, k): ... -@_dispatch +@_dispatchable def bridge_components(G) -> Generator[Incomplete, Incomplete, None]: ... class EdgeComponentAuxGraph: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcomponents.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcomponents.pyi index 967df857c7c9..ee074a6a682d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcomponents.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcomponents.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from networkx.algorithms.flow import edmonds_karp -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["k_components"] default_flow_func = edmonds_karp -@_dispatch +@_dispatchable def k_components(G, flow_func: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi index 20a19670600a..8f527058659c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi @@ -2,11 +2,11 @@ from _typeshed import Incomplete from collections.abc import Generator from networkx.algorithms.flow import edmonds_karp -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["all_node_cuts"] default_flow_func = edmonds_karp -@_dispatch +@_dispatchable def all_node_cuts(G, k: Incomplete | None = None, flow_func: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi index e8125730f977..1bd01705dec3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def stoer_wagner(G, weight: str = "weight", heap=...): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi index 12872bab7e7b..b43489088325 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def build_auxiliary_node_connectivity(G): ... -@_dispatch +@_dispatchable def build_auxiliary_edge_connectivity(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/core.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/core.pyi index 65ba651473dd..44bde570425a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/core.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/core.pyi @@ -1,18 +1,18 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def core_number(G): ... -@_dispatch +@_dispatchable def k_core(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ... -@_dispatch +@_dispatchable def k_shell(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ... -@_dispatch +@_dispatchable def k_crust(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ... -@_dispatch +@_dispatchable def k_corona(G, k, core_number: Incomplete | None = None): ... -@_dispatch +@_dispatchable def k_truss(G, k): ... -@_dispatch +@_dispatchable def onion_layers(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/covering.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/covering.pyi index 67304950359e..8b50c52a1b37 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/covering.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/covering.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ... -@_dispatch +@_dispatchable def is_edge_cover(G, cover): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cuts.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cuts.pyi index 2f6d488e2727..11ef7637a259 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cuts.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cuts.pyi @@ -1,20 +1,20 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def cut_size(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def volume(G, S, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def normalized_cut_size(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def conductance(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def edge_expansion(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def mixing_expansion(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def node_expansion(G, S): ... -@_dispatch +@_dispatchable def boundary_expansion(G, S): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cycles.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cycles.pyi index a4b09797b966..8236680f3f05 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cycles.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/cycles.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def cycle_basis(G, root: Incomplete | None = None): ... -@_dispatch +@_dispatchable def simple_cycles(G, length_bound: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ... class _NeighborhoodCache(dict[Incomplete, Incomplete]): @@ -13,11 +13,11 @@ class _NeighborhoodCache(dict[Incomplete, Incomplete]): def __init__(self, G) -> None: ... def __missing__(self, v): ... -@_dispatch +@_dispatchable def chordless_cycles(G, length_bound: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def recursive_simple_cycles(G): ... -@_dispatch +@_dispatchable def find_cycle(G, source: Incomplete | None = None, orientation: Incomplete | None = None): ... -@_dispatch +@_dispatchable def minimum_cycle_basis(G, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi index 8ee16cec2003..c672127feb42 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi @@ -1,8 +1,8 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def d_separated(G, x, y, z): ... -@_dispatch +@_dispatchable def minimal_d_separator(G, u, v): ... -@_dispatch +@_dispatchable def is_minimal_d_separator(G, u, v, z): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi index 6f894e7a1e60..b85fff5cb09b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi @@ -3,39 +3,39 @@ from collections.abc import Callable, Generator, Iterable, Reversible from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def descendants(G: Graph[_Node], source: _Node) -> set[_Node]: ... -@_dispatch +@_dispatchable def ancestors(G: Graph[_Node], source: _Node) -> set[_Node]: ... -@_dispatch +@_dispatchable def is_directed_acyclic_graph(G: Graph[_Node]) -> bool: ... -@_dispatch +@_dispatchable def topological_generations(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ... -@_dispatch +@_dispatchable def topological_sort(G: DiGraph[_Node]) -> Generator[_Node, None, None]: ... -@_dispatch +@_dispatchable def lexicographical_topological_sort( G: DiGraph[_Node], key: Callable[[_Node], SupportsRichComparison] | None = None ) -> Generator[_Node, None, None]: ... -@_dispatch +@_dispatchable def all_topological_sorts(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ... -@_dispatch +@_dispatchable def is_aperiodic(G: DiGraph[_Node]) -> bool: ... -@_dispatch +@_dispatchable def transitive_closure(G: Graph[_Node], reflexive: bool = False) -> Graph[_Node]: ... -@_dispatch +@_dispatchable def transitive_closure_dag(G: DiGraph[_Node], reflexive: bool = False) -> DiGraph[_Node]: ... -@_dispatch +@_dispatchable def transitive_reduction(G: DiGraph[_Node]) -> DiGraph[_Node]: ... -@_dispatch +@_dispatchable def antichains(G: DiGraph[_Node], topo_order: Reversible[_Node] | None = None) -> Generator[list[_Node], None, None]: ... -@_dispatch +@_dispatchable def dag_longest_path( G: DiGraph[_Node], weight: str = "weight", default_weight: int = 1, topo_order: Iterable[_Node] | None = None ) -> list[_Node]: ... -@_dispatch +@_dispatchable def dag_longest_path_length(G: DiGraph[_Node], weight: str = "weight", default_weight: int = 1) -> int: ... -@_dispatch +@_dispatchable def dag_to_branching(G: Graph[_Node]) -> Graph[_Node]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_measures.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_measures.pyi index 6949c26695fb..35e356e71cb7 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_measures.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_measures.pyi @@ -1,18 +1,18 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def eccentricity(G, v: Incomplete | None = None, sp: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def diameter(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def periphery(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def radius(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def center(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def barycenter(G, weight: Incomplete | None = None, attr: Incomplete | None = None, sp: Incomplete | None = None): ... -@_dispatch +@_dispatchable def resistance_distance(G, nodeA, nodeB, weight: Incomplete | None = None, invert_weight: bool = True): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_regular.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_regular.pyi index 4b3b23e02616..e477deb4a0cb 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_regular.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_regular.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_distance_regular(G): ... -@_dispatch +@_dispatchable def global_parameters(b, c): ... -@_dispatch +@_dispatchable def intersection_array(G): ... -@_dispatch +@_dispatchable def is_strongly_regular(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominance.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominance.pyi index 37d5ab6e59ca..a87b0172e7da 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominance.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominance.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def immediate_dominators(G, start): ... -@_dispatch +@_dispatchable def dominance_frontiers(G, start): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominating.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominating.pyi index 03dae96b882f..0f9535464f32 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominating.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/dominating.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def dominating_set(G, start_with: Incomplete | None = None): ... -@_dispatch +@_dispatchable def is_dominating_set(G, nbunch): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi index c3eb6064721d..a0083616a943 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi @@ -1,8 +1,8 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def efficiency(G, u, v): ... -@_dispatch +@_dispatchable def global_efficiency(G): ... -@_dispatch +@_dispatchable def local_efficiency(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/euler.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/euler.pyi index f63b1337d624..b88b278cc30e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/euler.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/euler.pyi @@ -1,17 +1,17 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_eulerian(G): ... -@_dispatch +@_dispatchable def is_semieulerian(G): ... -@_dispatch +@_dispatchable def eulerian_circuit(G, source: Incomplete | None = None, keys: bool = False) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def has_eulerian_path(G, source: Incomplete | None = None): ... -@_dispatch +@_dispatchable def eulerian_path(G, source: Incomplete | None = None, keys: bool = False) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def eulerize(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi index 94e7ad790fbd..f5a6c21b3f23 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def boykov_kolmogorov( G, s, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi index bdcad0ee8e28..36918442e80e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def capacity_scaling(G, demand: str = "demand", capacity: str = "capacity", weight: str = "weight", heap=...): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi index bf85ca8f542b..2a37c2973077 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def dinitz( G, s, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi index f6c43c5f0d71..0989f90f39d3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def edmonds_karp( G, s, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/gomory_hu.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/gomory_hu.pyi index a72af8b9f54b..5c7f878564d1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/gomory_hu.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/gomory_hu.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable from .edmondskarp import edmonds_karp @@ -8,5 +8,5 @@ __all__ = ["gomory_hu_tree"] default_flow_func = edmonds_karp -@_dispatch +@_dispatchable def gomory_hu_tree(G, capacity: str = "capacity", flow_func: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/maxflow.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/maxflow.pyi index ef3e7acc33d7..f64d48aa8cdb 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/maxflow.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/maxflow.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable from .preflowpush import preflow_push @@ -8,11 +8,11 @@ __all__ = ["maximum_flow", "maximum_flow_value", "minimum_cut", "minimum_cut_val default_flow_func = preflow_push -@_dispatch +@_dispatchable def maximum_flow(flowG, _s, _t, capacity: str = "capacity", flow_func: Incomplete | None = None, **kwargs): ... -@_dispatch +@_dispatchable def maximum_flow_value(flowG, _s, _t, capacity: str = "capacity", flow_func: Incomplete | None = None, **kwargs): ... -@_dispatch +@_dispatchable def minimum_cut(flowG, _s, _t, capacity: str = "capacity", flow_func: Incomplete | None = None, **kwargs): ... -@_dispatch +@_dispatchable def minimum_cut_value(flowG, _s, _t, capacity: str = "capacity", flow_func: Incomplete | None = None, **kwargs): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/mincost.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/mincost.pyi index d1bed62bb8af..41f70569369b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/mincost.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/mincost.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def min_cost_flow_cost(G, demand: str = "demand", capacity: str = "capacity", weight: str = "weight"): ... -@_dispatch +@_dispatchable def min_cost_flow(G, demand: str = "demand", capacity: str = "capacity", weight: str = "weight"): ... -@_dispatch +@_dispatchable def cost_of_flow(G, flowDict, weight: str = "weight"): ... -@_dispatch +@_dispatchable def max_flow_min_cost(G, s, t, capacity: str = "capacity", weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi index 662b663594d2..dcbc88ac35c6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class _DataEssentialsAndFunctions: node_list: Incomplete @@ -38,5 +38,5 @@ class _DataEssentialsAndFunctions: def residual_capacity(self, i, p): ... def find_leaving_edge(self, Wn, We): ... -@_dispatch +@_dispatchable def network_simplex(G, demand: str = "demand", capacity: str = "capacity", weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi index 97ce358a1524..51547a1c03a1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def preflow_push( G, s, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi index 2d700002750e..93fdf09f637c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def shortest_augmenting_path( G, s, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi index 41b7bb9455b0..04c99b4ed081 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class CurrentEdge: def __init__(self, edges) -> None: ... @@ -18,9 +18,9 @@ class GlobalRelabelThreshold: def is_reached(self): ... def clear_work(self) -> None: ... -@_dispatch +@_dispatchable def build_residual_network(G, capacity): ... -@_dispatch +@_dispatchable def detect_unboundedness(R, s, t) -> None: ... -@_dispatch +@_dispatchable def build_flow_dict(G, R): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graph_hashing.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graph_hashing.pyi index 50d4c672189e..218bf2f6a0d5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graph_hashing.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graph_hashing.pyi @@ -1,12 +1,12 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def weisfeiler_lehman_graph_hash( G, edge_attr: Incomplete | None = None, node_attr: Incomplete | None = None, iterations: int = 3, digest_size: int = 16 ): ... -@_dispatch +@_dispatchable def weisfeiler_lehman_subgraph_hashes( G, edge_attr: Incomplete | None = None, node_attr: Incomplete | None = None, iterations: int = 3, digest_size: int = 16 ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graphical.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graphical.pyi index 02b44c455553..5f886377b9b7 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graphical.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/graphical.pyi @@ -1,14 +1,14 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_graphical(sequence, method: str = "eg"): ... -@_dispatch +@_dispatchable def is_valid_degree_sequence_havel_hakimi(deg_sequence): ... -@_dispatch +@_dispatchable def is_valid_degree_sequence_erdos_gallai(deg_sequence): ... -@_dispatch +@_dispatchable def is_multigraphical(sequence): ... -@_dispatch +@_dispatchable def is_pseudographical(sequence): ... -@_dispatch +@_dispatchable def is_digraphical(in_sequence, out_sequence): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi index 6cecb2b2649a..09f4dc139b70 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def flow_hierarchy(G, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hybrid.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hybrid.pyi index efb3a27eb677..3bbc857d1feb 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hybrid.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/hybrid.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def kl_connected_subgraph(G, k, l, low_memory: bool = False, same_as_graph: bool = False): ... -@_dispatch +@_dispatchable def is_kl_connected(G, k, l, low_memory: bool = False): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isolate.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isolate.pyi index f620e5e62d2f..1030cb1c5bb4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isolate.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isolate.pyi @@ -1,8 +1,8 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_isolate(G, n): ... -@_dispatch +@_dispatchable def isolates(G): ... -@_dispatch +@_dispatchable def number_of_isolates(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorph.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorph.pyi index 7d2fa069c6fc..895b71cb59af 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorph.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorph.pyi @@ -1,23 +1,23 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["could_be_isomorphic", "fast_could_be_isomorphic", "faster_could_be_isomorphic", "is_isomorphic"] -@_dispatch +@_dispatchable def could_be_isomorphic(G1, G2): ... graph_could_be_isomorphic = could_be_isomorphic -@_dispatch +@_dispatchable def fast_could_be_isomorphic(G1, G2): ... fast_graph_could_be_isomorphic = fast_could_be_isomorphic -@_dispatch +@_dispatchable def faster_could_be_isomorphic(G1, G2): ... faster_graph_could_be_isomorphic = faster_could_be_isomorphic -@_dispatch +@_dispatchable def is_isomorphic(G1, G2, node_match: Incomplete | None = None, edge_match: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi index 74cb0f8846e6..aab135be0fda 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/matchhelpers.pyi @@ -1,25 +1,25 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def categorical_node_match(attr, default): ... categorical_edge_match: Incomplete -@_dispatch +@_dispatchable def categorical_multiedge_match(attr, default): ... -@_dispatch +@_dispatchable def numerical_node_match(attr, default, rtol: float = 1e-05, atol: float = 1e-08): ... numerical_edge_match: Incomplete -@_dispatch +@_dispatchable def numerical_multiedge_match(attr, default, rtol: float = 1e-05, atol: float = 1e-08): ... -@_dispatch +@_dispatchable def generic_node_match(attr, default, op): ... generic_edge_match: Incomplete -@_dispatch +@_dispatchable def generic_multiedge_match(attr, default, op): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi index 7919706169a9..8c56107e1774 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def rooted_tree_isomorphism(t1, root1, t2, root2): ... -@_dispatch +@_dispatchable def tree_isomorphism(t1, t2): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi index 8cfa42a4357d..d8916fbadba8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi @@ -2,7 +2,7 @@ from _typeshed import Incomplete from collections.abc import Generator from typing import NamedTuple -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class _GraphParameters(NamedTuple): G1: Incomplete @@ -25,11 +25,11 @@ class _StateParameters(NamedTuple): T2_tilde: Incomplete T2_tilde_in: Incomplete -@_dispatch +@_dispatchable def vf2pp_isomorphism(G1, G2, node_label: Incomplete | None = None, default_label: Incomplete | None = None): ... -@_dispatch +@_dispatchable def vf2pp_is_isomorphic(G1, G2, node_label: Incomplete | None = None, default_label: Incomplete | None = None): ... -@_dispatch +@_dispatchable def vf2pp_all_isomorphisms( G1, G2, node_label: Incomplete | None = None, default_label: Incomplete | None = None ) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi index 46b3f7099315..d2dba97399b5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def hits(G, max_iter: int = 100, tol: float = 1e-08, nstart: Incomplete | None = None, normalized: bool = True): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi index c283f0e66492..2ed3765aecce 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def pagerank( G, alpha: float = 0.85, @@ -13,7 +13,7 @@ def pagerank( weight: str = "weight", dangling: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def google_matrix( G, alpha: float = 0.85, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_prediction.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_prediction.pyi index aa0a530fbd77..1ef94518386e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_prediction.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/link_prediction.pyi @@ -1,20 +1,20 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def resource_allocation_index(G, ebunch: Incomplete | None = None): ... -@_dispatch +@_dispatchable def jaccard_coefficient(G, ebunch: Incomplete | None = None): ... -@_dispatch +@_dispatchable def adamic_adar_index(G, ebunch: Incomplete | None = None): ... -@_dispatch +@_dispatchable def common_neighbor_centrality(G, ebunch: Incomplete | None = None, alpha: float = 0.8): ... -@_dispatch +@_dispatchable def preferential_attachment(G, ebunch: Incomplete | None = None): ... -@_dispatch +@_dispatchable def cn_soundarajan_hopcroft(G, ebunch: Incomplete | None = None, community: str = "community"): ... -@_dispatch +@_dispatchable def ra_index_soundarajan_hopcroft(G, ebunch: Incomplete | None = None, community: str = "community"): ... -@_dispatch +@_dispatchable def within_inter_cluster(G, ebunch: Incomplete | None = None, delta: float = 0.001, community: str = "community"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi index f9e16cfc4ffc..700a7fce8c73 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi @@ -1,13 +1,13 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def all_pairs_lowest_common_ancestor(G, pairs: Incomplete | None = None): ... -@_dispatch +@_dispatchable def lowest_common_ancestor(G, node1, node2, default: Incomplete | None = None): ... -@_dispatch +@_dispatchable def tree_all_pairs_lowest_common_ancestor( G, root: Incomplete | None = None, pairs: Incomplete | None = None ) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/matching.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/matching.pyi index 3873396af248..ba797a5a12b3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/matching.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/matching.pyi @@ -1,14 +1,14 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def maximal_matching(G): ... -@_dispatch +@_dispatchable def is_matching(G, matching): ... -@_dispatch +@_dispatchable def is_maximal_matching(G, matching): ... -@_dispatch +@_dispatchable def is_perfect_matching(G, matching): ... -@_dispatch +@_dispatchable def min_weight_matching(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def max_weight_matching(G, maxcardinality: bool = False, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/minors/contraction.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/minors/contraction.pyi index 1a1a1fdc21ba..c76c1b1b5d48 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/minors/contraction.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/minors/contraction.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def equivalence_classes(iterable, relation): ... -@_dispatch +@_dispatchable def quotient_graph( G, partition, @@ -14,10 +14,10 @@ def quotient_graph( relabel: bool = False, create_using: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def contracted_nodes(G, u, v, self_loops: bool = True, copy: bool = True): ... identified_nodes = contracted_nodes -@_dispatch +@_dispatchable def contracted_edge(G, edge, self_loops: bool = True, copy: bool = True): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/mis.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/mis.pyi index 4172e5faba15..1d4b262dde29 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/mis.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/mis.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def maximal_independent_set(G, nodes: Incomplete | None = None, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/moral.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/moral.pyi index e333ac5e21ae..570061651f86 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/moral.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/moral.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def moral_graph(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/node_classification.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/node_classification.pyi index bec0e815a189..510c72a25e3d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/node_classification.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/node_classification.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def harmonic_function(G, max_iter: int = 30, label_name: str = "label"): ... -@_dispatch +@_dispatchable def local_and_global_consistency(G, alpha: float = 0.99, max_iter: int = 30, label_name: str = "label"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/non_randomness.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/non_randomness.pyi index 82459492d3ae..5e0941436883 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/non_randomness.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/non_randomness.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def non_randomness(G, k: Incomplete | None = None, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/all.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/all.pyi index c14667101088..a595296a7853 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/all.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/all.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def union_all(graphs, rename=()): ... -@_dispatch +@_dispatchable def disjoint_union_all(graphs): ... -@_dispatch +@_dispatchable def compose_all(graphs): ... -@_dispatch +@_dispatchable def intersection_all(graphs): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi index 8c45b4aa9fc8..ef7f4943ca52 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi @@ -2,15 +2,15 @@ from collections.abc import Hashable from typing import TypeVar from networkx.classes.digraph import DiGraph -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def disjoint_union(G, H): ... -@_dispatch +@_dispatchable def intersection(G, H): ... -@_dispatch +@_dispatchable def difference(G, H): ... -@_dispatch +@_dispatchable def symmetric_difference(G, H): ... _X = TypeVar("_X", bound=Hashable, covariant=True) @@ -18,7 +18,7 @@ _Y = TypeVar("_Y", bound=Hashable, covariant=True) # GT = TypeVar('GT', bound=Graph[_Node]) # TODO: This does not handle the cases when graphs of different types are passed which is allowed -@_dispatch +@_dispatchable def compose(G: DiGraph[_X], H: DiGraph[_Y]) -> DiGraph[_X | _Y]: ... -@_dispatch +@_dispatchable def union(G: DiGraph[_X], H: DiGraph[_Y], rename=()) -> DiGraph[_X | _Y]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi index e7dc28a4e179..96b54b2d4275 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi @@ -1,16 +1,16 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def tensor_product(G, H): ... -@_dispatch +@_dispatchable def cartesian_product(G, H): ... -@_dispatch +@_dispatchable def lexicographic_product(G, H): ... -@_dispatch +@_dispatchable def strong_product(G, H): ... -@_dispatch +@_dispatchable def power(G, k): ... -@_dispatch +@_dispatchable def rooted_product(G, H, root): ... -@_dispatch +@_dispatchable def corona_product(G, H): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/unary.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/unary.pyi index 9fe98be94ce3..b17f988839b3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/unary.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/unary.pyi @@ -2,11 +2,11 @@ from collections.abc import Hashable from typing import TypeVar from networkx.classes.graph import Graph -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable _G = TypeVar("_G", bound=Graph[Hashable]) -@_dispatch +@_dispatchable def complement(G): ... -@_dispatch +@_dispatchable def reverse(G: _G, copy: bool = True) -> _G: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planar_drawing.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planar_drawing.pyi index 315cc41d1935..028c7aec2520 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planar_drawing.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planar_drawing.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def combinatorial_embedding_to_pos(embedding, fully_triangulate: bool = False): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi index 03f951d108d5..5df3c945c7c4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi @@ -3,13 +3,13 @@ from collections.abc import Generator, Mapping, MutableSet, Reversible from networkx.classes.digraph import DiGraph from networkx.classes.graph import _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["check_planarity", "is_planar", "PlanarEmbedding"] -@_dispatch +@_dispatchable def is_planar(G) -> bool: ... -@_dispatch +@_dispatchable def check_planarity(G, counterexample: bool = False): ... class Interval: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/polynomials.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/polynomials.pyi index d6f4cb06673e..805beff63985 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/polynomials.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/polynomials.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def tutte_polynomial(G): ... -@_dispatch +@_dispatchable def chromatic_polynomial(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/reciprocity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/reciprocity.pyi index 56195c75279f..3af842628188 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/reciprocity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/reciprocity.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def reciprocity(G, nodes: Incomplete | None = None): ... -@_dispatch +@_dispatchable def overall_reciprocity(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/regular.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/regular.pyi index 7a0be21305d7..1e66cfe1c92d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/regular.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/regular.pyi @@ -1,8 +1,8 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_regular(G): ... -@_dispatch +@_dispatchable def is_k_regular(G, k): ... -@_dispatch +@_dispatchable def k_factor(G, k, matching_weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/richclub.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/richclub.pyi index b7da6c2db4b6..fa8f1f06df26 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/richclub.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/richclub.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def rich_club_coefficient(G, normalized: bool = True, Q: float = 100, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi index 28a07a518a35..6b5160269014 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def astar_path(G, source, target, heuristic: Incomplete | None = None, weight: str = "weight"): ... -@_dispatch +@_dispatchable def astar_path_length(G, source, target, heuristic: Incomplete | None = None, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi index fc7b12cb88aa..355782732342 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi @@ -1,12 +1,12 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def floyd_warshall_numpy(G, nodelist: Incomplete | None = None, weight: str = "weight"): ... -@_dispatch +@_dispatchable def floyd_warshall_predecessor_and_distance(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def reconstruct_path(source, target, predecessors): ... -@_dispatch +@_dispatchable def floyd_warshall(G, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi index 2aefd6903c57..82723d3eb9e8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi @@ -3,9 +3,9 @@ from collections.abc import Generator from typing import overload from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def has_path(G: Graph[_Node], source: _Node, target: _Node) -> bool: ... @overload def shortest_path( @@ -15,7 +15,7 @@ def shortest_path( def shortest_path(G: Graph[_Node], target: _Node, method: str = "dijkstra") -> dict[_Node, list[_Node]]: ... @overload def shortest_path(G: Graph[_Node], source: _Node, method: str = "dijkstra") -> dict[_Node, list[_Node]]: ... -@_dispatch +@_dispatchable def shortest_path_length( G, source: Incomplete | None = None, @@ -23,9 +23,9 @@ def shortest_path_length( weight: Incomplete | None = None, method: str = "dijkstra", ): ... -@_dispatch +@_dispatchable def average_shortest_path_length(G, weight: Incomplete | None = None, method: str | None = None): ... -@_dispatch +@_dispatchable def all_shortest_paths( G: Graph[_Node], source: _Node, target: _Node, weight: Incomplete | None = None, method: str = "dijkstra" ) -> Generator[list[_Node], None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi index b9505baa86da..cb4eeab99d23 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi @@ -1,23 +1,23 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def single_source_shortest_path_length(G, source, cutoff: Incomplete | None = None): ... -@_dispatch +@_dispatchable def single_target_shortest_path_length(G, target, cutoff: Incomplete | None = None): ... -@_dispatch +@_dispatchable def all_pairs_shortest_path_length(G, cutoff: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def bidirectional_shortest_path(G, source, target): ... -@_dispatch +@_dispatchable def single_source_shortest_path(G, source, cutoff: Incomplete | None = None): ... -@_dispatch +@_dispatchable def single_target_shortest_path(G, target, cutoff: Incomplete | None = None): ... -@_dispatch +@_dispatchable def all_pairs_shortest_path(G, cutoff: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def predecessor( G, source, target: Incomplete | None = None, cutoff: Incomplete | None = None, return_seen: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi index ad3d0d0c3879..2716cbfbc84c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi @@ -3,70 +3,70 @@ from collections.abc import Callable, Generator from typing import Any from typing_extensions import TypeAlias -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable # type alias for the weight function _WeightFunction: TypeAlias = Callable[[Any, Any, dict[str, Any]], float | None] -@_dispatch +@_dispatchable def dijkstra_path(G, source, target, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def dijkstra_path_length(G, source, target, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def single_source_dijkstra_path(G, source, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def single_source_dijkstra_path_length(G, source, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def single_source_dijkstra( G, source, target: Incomplete | None = None, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight" ): ... -@_dispatch +@_dispatchable def multi_source_dijkstra_path(G, sources, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def multi_source_dijkstra_path_length(G, sources, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def multi_source_dijkstra( G, sources, target: Incomplete | None = None, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight" ): ... -@_dispatch +@_dispatchable def dijkstra_predecessor_and_distance(G, source, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def all_pairs_dijkstra( G, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight" ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def all_pairs_dijkstra_path_length( G, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight" ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def all_pairs_dijkstra_path( G, cutoff: Incomplete | None = None, weight: str | _WeightFunction = "weight" ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def bellman_ford_predecessor_and_distance( G, source, target: Incomplete | None = None, weight: str | _WeightFunction = "weight", heuristic: bool = False ): ... -@_dispatch +@_dispatchable def bellman_ford_path(G, source, target, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def bellman_ford_path_length(G, source, target, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def single_source_bellman_ford_path(G, source, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def single_source_bellman_ford_path_length(G, source, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def single_source_bellman_ford(G, source, target: Incomplete | None = None, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def all_pairs_bellman_ford_path_length(G, weight: str | _WeightFunction = "weight") -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def all_pairs_bellman_ford_path(G, weight: str | _WeightFunction = "weight") -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def goldberg_radzik(G, source, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def negative_edge_cycle(G, weight: str | _WeightFunction = "weight", heuristic: bool = True): ... -@_dispatch +@_dispatchable def find_negative_cycle(G, source, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def bidirectional_dijkstra(G, source, target, weight: str | _WeightFunction = "weight"): ... -@_dispatch +@_dispatchable def johnson(G, weight: str | _WeightFunction = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/similarity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/similarity.pyi index dbd0e036dd4e..bec692662f97 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/similarity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/similarity.pyi @@ -1,9 +1,9 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def graph_edit_distance( G1, G2, @@ -19,7 +19,7 @@ def graph_edit_distance( upper_bound: Incomplete | None = None, timeout: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def optimal_edit_paths( G1, G2, @@ -33,7 +33,7 @@ def optimal_edit_paths( edge_ins_cost: Incomplete | None = None, upper_bound: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def optimize_graph_edit_distance( G1, G2, @@ -47,7 +47,7 @@ def optimize_graph_edit_distance( edge_ins_cost: Incomplete | None = None, upper_bound: Incomplete | None = None, ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def optimize_edit_paths( G1, G2, @@ -64,7 +64,7 @@ def optimize_edit_paths( roots: Incomplete | None = None, timeout: Incomplete | None = None, ) -> Generator[Incomplete, None, Incomplete]: ... -@_dispatch +@_dispatchable def simrank_similarity( G, source: Incomplete | None = None, @@ -73,11 +73,11 @@ def simrank_similarity( max_iterations: int = 1000, tolerance: float = 0.0001, ): ... -@_dispatch +@_dispatchable def panther_similarity( G, source, k: int = 5, path_length: int = 5, c: float = 0.5, delta: float = 0.1, eps: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def generate_random_paths( G, sample_size, path_length: int = 5, index_map: Incomplete | None = None ) -> Generator[Incomplete, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/simple_paths.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/simple_paths.pyi index 292bf9d57b01..6e69d1d1386e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/simple_paths.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/simple_paths.pyi @@ -2,21 +2,21 @@ from _typeshed import Incomplete from collections.abc import Generator, Sequence from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["all_simple_paths", "is_simple_path", "shortest_simple_paths", "all_simple_edge_paths"] -@_dispatch +@_dispatchable def is_simple_path(G: Graph[_Node], nodes: Sequence[_Node]): ... -@_dispatch +@_dispatchable def all_simple_paths( G: Graph[_Node], source: _Node, target: _Node, cutoff: Incomplete | None = None ) -> Generator[list[_Node], None, None]: ... -@_dispatch +@_dispatchable def all_simple_edge_paths( G: Graph[_Node], source: _Node, target: _Node, cutoff: Incomplete | None = None ) -> Generator[list[_Node] | list[tuple[_Node, _Node]], None, list[_Node] | None]: ... -@_dispatch +@_dispatchable def shortest_simple_paths( G: Graph[_Node], source: _Node, target: _Node, weight: Incomplete | None = None ) -> Generator[list[_Node], None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smallworld.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smallworld.pyi index eb1a8c653ea4..cb9c7b252e04 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smallworld.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smallworld.pyi @@ -1,14 +1,14 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def random_reference(G, niter: int = 1, connectivity: bool = True, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def lattice_reference( G, niter: int = 5, D: Incomplete | None = None, connectivity: bool = True, seed: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def sigma(G, niter: int = 100, nrand: int = 10, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def omega(G, niter: int = 5, nrand: int = 10, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smetric.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smetric.pyi index c1104f53209b..61eb1aebdb14 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smetric.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/smetric.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def s_metric(G, normalized: bool = True): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/sparsifiers.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/sparsifiers.pyi index b03b832f4b45..e556626f172a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/sparsifiers.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/sparsifiers.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def spanner(G, stretch, weight: Incomplete | None = None, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/structuralholes.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/structuralholes.pyi index 30edb0f2cbab..bc396853a637 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/structuralholes.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/structuralholes.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def effective_size(G, nodes: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def constraint(G, nodes: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def local_constraint(G, u, v, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/summarization.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/summarization.pyi index c871b7efd6a6..e1a359b8c72d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/summarization.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/summarization.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def dedensify(G, threshold, prefix: Incomplete | None = None, copy: bool = True): ... -@_dispatch +@_dispatchable def snap_aggregation( G, node_attributes, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/swap.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/swap.pyi index f11235573f2f..be15bb2236fd 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/swap.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/swap.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def directed_edge_swap(G, *, nswap: int = 1, max_tries: int = 100, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def double_edge_swap(G, nswap: int = 1, max_tries: int = 100, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def connected_double_edge_swap(G, nswap: int = 1, _window_threshold: int = 3, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/threshold.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/threshold.pyi index f1fb06058e35..4649c6638d33 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/threshold.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/threshold.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_threshold_graph(G): ... -@_dispatch +@_dispatchable def find_threshold_graph(G, create_using: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tournament.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tournament.pyi index 21eb5721ae70..a8f06989d1a2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tournament.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tournament.pyi @@ -1,16 +1,16 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_tournament(G): ... -@_dispatch +@_dispatchable def hamiltonian_path(G): ... -@_dispatch +@_dispatchable def random_tournament(n, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def score_sequence(G): ... -@_dispatch +@_dispatchable def is_reachable(G, s, t): ... -@_dispatch +@_dispatchable def is_strongly_connected(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi index 4db534c6d921..057bc9e8972d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def bfs_beam_edges(G, source, value, width: Incomplete | None = None) -> Generator[Incomplete, Incomplete, Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi index e02ce7e7c779..dbcf268d599c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi @@ -1,25 +1,25 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def bfs_edges( G, source, reverse: bool = False, depth_limit: Incomplete | None = None, sort_neighbors: Incomplete | None = None ) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def bfs_tree( G, source, reverse: bool = False, depth_limit: Incomplete | None = None, sort_neighbors: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def bfs_predecessors( G, source, depth_limit: Incomplete | None = None, sort_neighbors: Incomplete | None = None ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def bfs_successors( G, source, depth_limit: Incomplete | None = None, sort_neighbors: Incomplete | None = None ) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def bfs_layers(G, sources) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def descendants_at_distance(G, source, distance): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi index 7a45dcd3819f..0b1abaedf280 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi @@ -2,21 +2,21 @@ from _typeshed import Incomplete from collections.abc import Generator from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def dfs_edges( G: Graph[_Node], source: _Node | None = None, depth_limit: int | None = None ) -> Generator[tuple[_Node, _Node], None, None]: ... -@_dispatch +@_dispatchable def dfs_tree(G, source: Incomplete | None = None, depth_limit: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dfs_predecessors(G, source: Incomplete | None = None, depth_limit: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dfs_successors(G, source: Incomplete | None = None, depth_limit: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dfs_postorder_nodes(G, source: Incomplete | None = None, depth_limit: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dfs_preorder_nodes(G, source: Incomplete | None = None, depth_limit: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dfs_labeled_edges(G, source: Incomplete | None = None, depth_limit: Incomplete | None = None) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi index 91992a617089..4999e56ee880 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi @@ -1,9 +1,9 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def edge_bfs( G, source: Incomplete | None = None, orientation: Incomplete | None = None ) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi index 8d4ad7ec1d90..f2b11d4736f2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi @@ -1,9 +1,9 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def edge_dfs( G, source: Incomplete | None = None, orientation: Incomplete | None = None ) -> Generator[Incomplete, None, Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi index e60469f9db78..8131ff2ce3ba 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi @@ -4,7 +4,7 @@ from dataclasses import dataclass from networkx.classes.graph import _Node from networkx.classes.multidigraph import MultiDiGraph -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = [ "branching_weight", @@ -17,9 +17,9 @@ __all__ = [ "Edmonds", ] -@_dispatch +@_dispatchable def branching_weight(G, attr: str = "weight", default: float = 1): ... -@_dispatch +@_dispatchable def greedy_branching(G, attr: str = "weight", default: float = 1, kind: str = "max", seed: Incomplete | None = None): ... class MultiDiGraph_EdgeKey(MultiDiGraph[_Node]): @@ -49,19 +49,19 @@ class Edmonds: seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def maximum_branching( G, attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def minimum_branching( G, attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def maximum_spanning_arborescence( G, attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def minimum_spanning_arborescence( G, attr: str = "weight", default: float = 1, preserve_attrs: bool = False, partition: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/coding.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/coding.pyi index aaf585c35f9b..180a04a7c1ac 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/coding.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/coding.pyi @@ -1,13 +1,13 @@ from networkx.exception import NetworkXException -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class NotATree(NetworkXException): ... -@_dispatch +@_dispatchable def to_nested_tuple(T, root, canonical_form: bool = False): ... -@_dispatch +@_dispatchable def from_nested_tuple(sequence, sensible_relabeling: bool = False): ... -@_dispatch +@_dispatchable def to_prufer_sequence(T): ... -@_dispatch +@_dispatchable def from_prufer_sequence(sequence): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi index ea14d081b271..998d6241c363 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def junction_tree(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi index 8f40029ff521..178b5a771cb7 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi @@ -3,30 +3,30 @@ from collections.abc import Iterator from dataclasses import dataclass from enum import Enum -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class EdgePartition(Enum): OPEN = 0 INCLUDED = 1 EXCLUDED = 2 -@_dispatch +@_dispatchable def minimum_spanning_edges( G, algorithm: str = "kruskal", weight: str = "weight", keys: bool = True, data: bool = True, ignore_nan: bool = False ): ... -@_dispatch +@_dispatchable def maximum_spanning_edges( G, algorithm: str = "kruskal", weight: str = "weight", keys: bool = True, data: bool = True, ignore_nan: bool = False ): ... -@_dispatch +@_dispatchable def minimum_spanning_tree(G, weight: str = "weight", algorithm: str = "kruskal", ignore_nan: bool = False): ... -@_dispatch +@_dispatchable def partition_spanning_tree( G, minimum: bool = True, weight: str = "weight", partition: str = "partition", ignore_nan: bool = False ): ... -@_dispatch +@_dispatchable def maximum_spanning_tree(G, weight: str = "weight", algorithm: str = "kruskal", ignore_nan: bool = False): ... -@_dispatch +@_dispatchable def random_spanning_tree(G, weight: Incomplete | None = None, *, multiplicative: bool = True, seed: Incomplete | None = None): ... class SpanningTreeIterator: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi index 712f9f546e83..5a3981c63c6f 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def join(rooted_trees, label_attribute: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/recognition.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/recognition.pyi index 49b318a857e0..b5b303b66c81 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/recognition.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/recognition.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_arborescence(G): ... -@_dispatch +@_dispatchable def is_branching(G): ... -@_dispatch +@_dispatchable def is_forest(G): ... -@_dispatch +@_dispatchable def is_tree(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/triads.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/triads.pyi index c3b4eeba410d..510b01cbdf2a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/triads.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/triads.pyi @@ -1,19 +1,19 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def triadic_census(G, nodelist: Incomplete | None = None): ... -@_dispatch +@_dispatchable def is_triad(G): ... -@_dispatch +@_dispatchable def all_triplets(G): ... -@_dispatch +@_dispatchable def all_triads(G) -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def triads_by_type(G): ... -@_dispatch +@_dispatchable def triad_type(G): ... -@_dispatch +@_dispatchable def random_triad(G, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/vitality.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/vitality.pyi index abc5840d530c..9a7cfcb2b64a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/vitality.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/vitality.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def closeness_vitality( G, node: Incomplete | None = None, weight: Incomplete | None = None, wiener_index: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/voronoi.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/voronoi.pyi index baefb2ea7509..6713ec759232 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/voronoi.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/voronoi.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def voronoi_cells(G, center_nodes, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi index dbafb2128541..1cff8ccd0f76 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def wiener_index(G, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi index 145713b3672b..459cd8baa8d9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi @@ -2,6 +2,7 @@ from _typeshed import Incomplete, SupportsItems, SupportsKeysAndGetItem, Unused from collections.abc import Generator, Hashable, Iterable, Iterator from typing import Literal, TypeVar, overload +from networkx import _dispatchable from networkx.algorithms.planarity import PlanarEmbedding from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph, _NBunch, _Node @@ -97,6 +98,7 @@ def non_neighbors(graph: Graph[_Node], node: _Node) -> Generator[_Node, None, No def non_edges(graph: Graph[_Node]) -> Generator[tuple[_Node, _Node], None, None]: ... def common_neighbors(G: Graph[_Node], u: _Node, v: _Node) -> Generator[_Node, None, None]: ... def is_weighted(G: Graph[_Node], edge: tuple[_Node, _Node] | None = None, weight: str = "weight") -> bool: ... +@_dispatchable def is_negatively_weighted(G: Graph[_Node], edge: tuple[_Node, _Node] | None = None, weight: str = "weight"): ... def is_empty(G: Graph[Hashable]) -> bool: ... def nodes_with_selfloops(G: Graph[_Node]) -> Generator[_Node, None, None]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert.pyi index ab291b08f71b..d02a612f993c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert.pyi @@ -2,7 +2,7 @@ from _typeshed import Incomplete from collections.abc import Callable, Iterable from networkx.classes.graph import Graph, _Data, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = [ "to_networkx_graph", @@ -17,14 +17,14 @@ __all__ = [ def to_networkx_graph( data: _Data[_Node], create_using: Graph[_Node] | Callable[[], Graph[_Node]] | None = None, multigraph_input: bool = False ) -> Graph[_Node]: ... -@_dispatch +@_dispatchable def to_dict_of_lists(G: Graph[_Node], nodelist: None | Iterable[_Node] = None) -> dict[_Node, list[_Node]]: ... -@_dispatch +@_dispatchable def from_dict_of_lists(d: dict[_Node, Iterable[_Node]], create_using: Incomplete | None = None) -> Graph[_Node]: ... def to_dict_of_dicts(G: Graph[_Node], nodelist=None, edge_data=None) -> dict[Incomplete, Incomplete]: ... -@_dispatch +@_dispatchable def from_dict_of_dicts(d, create_using=None, multigraph_input=False) -> Graph[Incomplete]: ... -@_dispatch +@_dispatchable def to_edgelist(G: Graph[_Node], nodelist=None): ... -@_dispatch +@_dispatchable def from_edgelist(edgelist, create_using=None) -> Graph[Incomplete]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi index 4b508a7b51dc..a94e00e7ada8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi @@ -5,7 +5,7 @@ from typing_extensions import TypeAlias import numpy from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable # stub_uploader won't allow pandas-stubs in the requires field https://github.com/typeshed-internal/stub_uploader/issues/90 # from pandas import DataFrame @@ -17,7 +17,7 @@ _ExtensionDtype: TypeAlias = Incomplete _Axes: TypeAlias = Collection[_Node] _G = TypeVar("_G", bound=Graph[Hashable]) -@_dispatch +@_dispatchable def to_pandas_adjacency( G: Graph[_Node], nodelist: _Axes[_Node] | None = None, @@ -31,7 +31,7 @@ def to_pandas_adjacency( def from_pandas_adjacency(df: _DataFrame, create_using: type[_G]) -> _G: ... @overload def from_pandas_adjacency(df: _DataFrame, create_using: None = None) -> Graph[Incomplete]: ... -@_dispatch +@_dispatchable def to_pandas_edgelist( G: Graph[_Node], source: str | int = "source", @@ -68,7 +68,7 @@ def from_pandas_edgelist( create_using: None = None, edge_key: str | None = None, ) -> Graph[Incomplete]: ... -@_dispatch +@_dispatchable def to_numpy_array( G: Graph[_Node], nodelist: Collection[_Node] | None = None, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_agraph.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_agraph.pyi index 58534aaadbdd..025489a5759a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_agraph.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_agraph.pyi @@ -4,16 +4,16 @@ from io import TextIOBase from typing_extensions import TypeAlias from networkx.classes.graph import Graph, _Node -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable # from pygraphviz.agraph import AGraph as _AGraph _AGraph: TypeAlias = Incomplete -@_dispatch +@_dispatchable def from_agraph(A, create_using: Incomplete | None = None) -> Graph[Incomplete]: ... def to_agraph(N: Graph[Hashable]) -> _AGraph: ... def write_dot(G: Graph[Hashable], path: str | TextIOBase) -> None: ... -@_dispatch +@_dispatchable def read_dot(path: str | TextIOBase) -> Graph[Incomplete]: ... def graphviz_layout( G: Graph[_Node], prog: str = "neato", root: str | None = None, args: str = "" diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pydot.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pydot.pyi index 7a37ceabce8f..0d8a59e9044f 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pydot.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pydot.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def write_dot(G, path) -> None: ... -@_dispatch +@_dispatchable def read_dot(path): ... -@_dispatch +@_dispatchable def from_pydot(P): ... def to_pydot(N): ... def graphviz_layout(G, prog: str = "neato", root: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pylab.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pylab.pyi index 1fc090b5f0a7..1852dcdd96a2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pylab.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/drawing/nx_pylab.pyi @@ -20,6 +20,7 @@ def draw_networkx_nodes( edgecolors: Incomplete | None = None, label: Incomplete | None = None, margins: Incomplete | None = None, + hide_ticks: bool = True, ): ... def draw_networkx_edges( G, @@ -43,6 +44,7 @@ def draw_networkx_edges( connectionstyle: str = "arc3", min_source_margin: int = 0, min_target_margin: int = 0, + hide_ticks: bool = True, ): ... def draw_networkx_labels( G, @@ -58,6 +60,7 @@ def draw_networkx_labels( verticalalignment: str = "center", ax: Incomplete | None = None, clip_on: bool = True, + hide_ticks: bool = True, ): ... def draw_networkx_edge_labels( G, @@ -75,6 +78,10 @@ def draw_networkx_edge_labels( ax: Incomplete | None = None, rotate: bool = True, clip_on: bool = True, + node_size: int = 300, + nodelist: Incomplete | None = None, + connectionstyle: str = "arc3", + hide_ticks: bool = True, ): ... def draw_circular(G, **kwargs) -> None: ... def draw_kamada_kawai(G, **kwargs) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/atlas.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/atlas.pyi index 3c6ab78a4fa3..f97cf915b717 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/atlas.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/atlas.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def graph_atlas(i): ... -@_dispatch +@_dispatchable def graph_atlas_g(): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/classic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/classic.pyi index 5ce9da870092..b35c8b4adb64 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/classic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/classic.pyi @@ -1,42 +1,42 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def full_rary_tree(r, n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def balanced_tree(r, h, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def barbell_graph(m1, m2, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def binomial_tree(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def complete_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def circular_ladder_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def circulant_graph(n, offsets, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def cycle_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dorogovtsev_goltsev_mendes_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def empty_graph(n: Incomplete | int = 0, create_using: Incomplete | None = None, default=...): ... -@_dispatch +@_dispatchable def ladder_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def lollipop_graph(m, n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def null_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def path_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def star_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def trivial_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def turan_graph(n, r): ... -@_dispatch +@_dispatchable def wheel_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def complete_multipartite_graph(*subset_sizes): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/cographs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/cographs.pyi index ce3faccf2fb6..2349a9dbe77d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/cographs.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/cographs.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def random_cograph(n, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/community.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/community.pyi index 893f3b824883..55e386934db1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/community.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/community.pyi @@ -1,24 +1,24 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def caveman_graph(l, k): ... -@_dispatch +@_dispatchable def connected_caveman_graph(l, k): ... -@_dispatch +@_dispatchable def relaxed_caveman_graph(l, k, p, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_partition_graph(sizes, p_in, p_out, seed: Incomplete | None = None, directed: bool = False): ... -@_dispatch +@_dispatchable def planted_partition_graph(l, k, p_in, p_out, seed: Incomplete | None = None, directed: bool = False): ... -@_dispatch +@_dispatchable def gaussian_random_partition_graph(n, s, v, p_in, p_out, directed: bool = False, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def ring_of_cliques(num_cliques, clique_size): ... -@_dispatch +@_dispatchable def windmill_graph(n, k): ... -@_dispatch +@_dispatchable def stochastic_block_model( sizes, p, @@ -28,7 +28,7 @@ def stochastic_block_model( selfloops: bool = False, sparse: bool = True, ): ... -@_dispatch +@_dispatchable def LFR_benchmark_graph( n, tau1, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/degree_seq.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/degree_seq.pyi index 73ba1619eb65..b24d74eea48e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/degree_seq.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/degree_seq.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = [ "configuration_model", @@ -12,21 +12,21 @@ __all__ = [ "random_degree_sequence_graph", ] -@_dispatch +@_dispatchable def configuration_model(deg_sequence, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def directed_configuration_model( in_degree_sequence, out_degree_sequence, create_using: Incomplete | None = None, seed: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def expected_degree_graph(w, seed: Incomplete | None = None, selfloops: bool = True): ... -@_dispatch +@_dispatchable def havel_hakimi_graph(deg_sequence, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def directed_havel_hakimi_graph(in_deg_sequence, out_deg_sequence, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def degree_sequence_tree(deg_sequence, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_degree_sequence_graph(sequence, seed: Incomplete | None = None, tries: int = 10): ... class DegreeSequenceRandomGraph: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/directed.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/directed.pyi index 9bae0a95b3aa..4be5ac627222 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/directed.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/directed.pyi @@ -1,14 +1,14 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def gn_graph(n, kernel: Incomplete | None = None, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def gnr_graph(n, p, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def gnc_graph(n, create_using: Incomplete | None = None, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def scale_free_graph( n, alpha: float = 0.41, @@ -20,5 +20,5 @@ def scale_free_graph( seed: Incomplete | None = None, initial_graph: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def random_k_out_graph(n, k, alpha, self_loops: bool = True, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/duplication.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/duplication.pyi index ea7f95cb0602..ec3248a8b9f1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/duplication.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/duplication.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def partial_duplication_graph(N, n, p, q, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def duplication_divergence_graph(n, p, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi index adeb8b300eb5..f64b9ec10d4b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def ego_graph(G, n, radius: float = 1, center: bool = True, undirected: bool = False, distance: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/expanders.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/expanders.pyi index 80c0f30e4894..9b2d9b1cd597 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/expanders.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/expanders.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def margulis_gabber_galil_graph(n, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def chordal_cycle_graph(p, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def paley_graph(p, create_using: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi index 0f146cee0628..0442140b39bf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi @@ -1,14 +1,14 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def geometric_edges(G, radius, p: float = 2): ... -@_dispatch +@_dispatchable def random_geometric_graph( n, radius, dim: int = 2, pos: Incomplete | None = None, p: float = 2, seed: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def soft_random_geometric_graph( n, radius, @@ -18,7 +18,7 @@ def soft_random_geometric_graph( p_dist: Incomplete | None = None, seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def geographical_threshold_graph( n, theta, @@ -29,7 +29,7 @@ def geographical_threshold_graph( p_dist: Incomplete | None = None, seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def waxman_graph( n, beta: float = 0.4, @@ -41,9 +41,9 @@ def waxman_graph( ): ... # docstring marks p as int, but it still works with floats. So I think it's better for consistency -@_dispatch +@_dispatchable def navigable_small_world_graph(n, p: float = 1, q: int = 1, r: float = 2, dim: int = 2, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def thresholded_random_geometric_graph( n, radius, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/harary_graph.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/harary_graph.pyi index d797ee6ed69c..b62d2e2ce0e0 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/harary_graph.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/harary_graph.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def hnm_harary_graph(n, m, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def hkn_harary_graph(k, n, create_using: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/internet_as_graphs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/internet_as_graphs.pyi index a870d297000f..8c9542f45480 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/internet_as_graphs.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/internet_as_graphs.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["random_internet_as_graph"] @@ -37,5 +37,5 @@ class AS_graph_generator: nodes: Incomplete def generate(self): ... -@_dispatch +@_dispatchable def random_internet_as_graph(n, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/intersection.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/intersection.pyi index b850ad56cfc7..a58cbf5befcf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/intersection.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/intersection.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def uniform_random_intersection_graph(n, m, p, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def k_random_intersection_graph(n, m, k, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def general_random_intersection_graph(n, m, p, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/interval_graph.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/interval_graph.pyi index dd964187dc44..8a0d89c9e33e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/interval_graph.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/interval_graph.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def interval_graph(intervals): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/joint_degree_seq.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/joint_degree_seq.pyi index 844df93eff41..2f4ce6eeba33 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/joint_degree_seq.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/joint_degree_seq.pyi @@ -1,12 +1,12 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def is_valid_joint_degree(joint_degrees): ... -@_dispatch +@_dispatchable def joint_degree_graph(joint_degrees, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def is_valid_directed_joint_degree(in_degrees, out_degrees, nkk): ... -@_dispatch +@_dispatchable def directed_joint_degree_graph(in_degrees, out_degrees, nkk, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/lattice.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/lattice.pyi index 72205876e603..50ac54691da4 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/lattice.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/lattice.pyi @@ -1,18 +1,18 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def grid_2d_graph(m, n, periodic: bool = False, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def grid_graph(dim, periodic: bool = False): ... -@_dispatch +@_dispatchable def hypercube_graph(n): ... -@_dispatch +@_dispatchable def triangular_lattice_graph( m, n, periodic: bool = False, with_positions: bool = True, create_using: Incomplete | None = None ): ... -@_dispatch +@_dispatchable def hexagonal_lattice_graph( m, n, periodic: bool = False, with_positions: bool = True, create_using: Incomplete | None = None ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi index fac54f339bde..9d3625e22c7c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def line_graph(G, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def inverse_line_graph(G): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi index 38f2b4957040..31ced02dcc80 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def mycielskian(G, iterations: int = 1): ... -@_dispatch +@_dispatchable def mycielski_graph(n): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi index e97bf7838764..57e277dde533 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/nonisomorphic_trees.pyi @@ -1,9 +1,9 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def nonisomorphic_trees(order, create: str = "graph") -> Generator[Incomplete, None, None]: ... -@_dispatch +@_dispatchable def number_of_nonisomorphic_trees(order): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/random_graphs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/random_graphs.pyi index f18caa3b86e0..e3b557c785a0 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/random_graphs.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/random_graphs.pyi @@ -1,42 +1,42 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def fast_gnp_random_graph(n, p, seed: Incomplete | None = None, directed: bool = False): ... -@_dispatch +@_dispatchable def gnp_random_graph(n, p, seed: Incomplete | None = None, directed: bool = False): ... binomial_graph = gnp_random_graph erdos_renyi_graph = gnp_random_graph -@_dispatch +@_dispatchable def dense_gnm_random_graph(n, m, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def gnm_random_graph(n, m, seed: Incomplete | None = None, directed: bool = False): ... -@_dispatch +@_dispatchable def newman_watts_strogatz_graph(n, k, p, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def watts_strogatz_graph(n, k, p, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def connected_watts_strogatz_graph(n, k, p, tries: int = 100, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_regular_graph(d, n, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def barabasi_albert_graph(n, m, seed: Incomplete | None = None, initial_graph: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dual_barabasi_albert_graph(n, m1, m2, p, seed: Incomplete | None = None, initial_graph: Incomplete | None = None): ... -@_dispatch +@_dispatchable def extended_barabasi_albert_graph(n, m, p, q, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def powerlaw_cluster_graph(n, m, p, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_lobster(n, p1, p2, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_shell_graph(constructor, seed: Incomplete | None = None): ... -@_dispatch +@_dispatchable def random_powerlaw_tree(n, gamma: float = 3, seed: Incomplete | None = None, tries: int = 100): ... -@_dispatch +@_dispatchable def random_powerlaw_tree_sequence(n, gamma: float = 3, seed: Incomplete | None = None, tries: int = 100): ... -@_dispatch +@_dispatchable def random_kernel_graph(n, kernel_integral, kernel_root: Incomplete | None = None, seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/small.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/small.pyi index 56ad13a33051..4563f2308e58 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/small.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/small.pyi @@ -1,50 +1,50 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def LCF_graph(n, shift_list, repeats, create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def bull_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def chvatal_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def cubical_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def desargues_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def diamond_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def dodecahedral_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def frucht_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def heawood_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def hoffman_singleton_graph(): ... -@_dispatch +@_dispatchable def house_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def house_x_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def icosahedral_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def krackhardt_kite_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def moebius_kantor_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def octahedral_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def pappus_graph(): ... -@_dispatch +@_dispatchable def petersen_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def sedgewick_maze_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def tetrahedral_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def truncated_cube_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def truncated_tetrahedron_graph(create_using: Incomplete | None = None): ... -@_dispatch +@_dispatchable def tutte_graph(create_using: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/social.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/social.pyi index 18a7a9fd9811..b145710668b6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/social.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/social.pyi @@ -1,10 +1,10 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def karate_club_graph(): ... -@_dispatch +@_dispatchable def davis_southern_women_graph(): ... -@_dispatch +@_dispatchable def florentine_families_graph(): ... -@_dispatch +@_dispatchable def les_miserables_graph(): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi index 62cb464ce78b..23e1e5bffaa5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def spectral_graph_forge(G, alpha, transformation: str = "identity", seed: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi index c97ff6531f92..4dd8f1ecb2b3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def stochastic_graph(G, copy: bool = True, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/sudoku.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/sudoku.pyi index a271c653958b..15eb488e7f75 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/sudoku.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/sudoku.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def sudoku_graph(n: int = 3): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi index 313baec457c4..f511c2d87dee 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/trees.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def prefix_tree(paths): ... -@_dispatch +@_dispatchable def prefix_tree_recursive(paths): ... -@_dispatch +@_dispatchable def random_tree(n, seed: Incomplete | None = None, create_using: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/triads.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/triads.pyi index 1ab083026c2b..cdc648ee378d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/triads.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/generators/triads.pyi @@ -1,4 +1,4 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def triad_graph(triad_name): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi index 0a01e2419d8c..52961225175a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/algebraicconnectivity.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable class _PCGSolver: def __init__(self, A, M) -> None: ... @@ -10,7 +10,7 @@ class _LUSolver: def __init__(self, A) -> None: ... def solve(self, B, tol: Incomplete | None = None): ... -@_dispatch +@_dispatchable def algebraic_connectivity( G, weight: str = "weight", @@ -19,7 +19,7 @@ def algebraic_connectivity( method: str = "tracemin_pcg", seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def fiedler_vector( G, weight: str = "weight", @@ -28,7 +28,7 @@ def fiedler_vector( method: str = "tracemin_pcg", seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def spectral_ordering( G, weight: str = "weight", @@ -37,7 +37,7 @@ def spectral_ordering( method: str = "tracemin_pcg", seed: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def spectral_bisection( G, weight: str = "weight", diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/attrmatrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/attrmatrix.pyi index f8cfebb7b572..360a53ffbdd6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/attrmatrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/attrmatrix.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def attr_matrix( G, edge_attr: Incomplete | None = None, @@ -12,7 +12,7 @@ def attr_matrix( dtype: Incomplete | None = None, order: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def attr_sparse_matrix( G, edge_attr: Incomplete | None = None, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi index ee7a1bb9495d..a122ca706a24 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/bethehessianmatrix.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def bethe_hessian_matrix(G, r: Incomplete | None = None, nodelist: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/graphmatrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/graphmatrix.pyi index 58d1b661313e..6eb0c4243974 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/graphmatrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/graphmatrix.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def incidence_matrix( G, nodelist: Incomplete | None = None, @@ -10,5 +10,5 @@ def incidence_matrix( oriented: bool = False, weight: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def adjacency_matrix(G, nodelist: Incomplete | None = None, dtype: Incomplete | None = None, weight: str = "weight"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/laplacianmatrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/laplacianmatrix.pyi index 8921eb899769..5e607d91b15d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/laplacianmatrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/laplacianmatrix.pyi @@ -1,18 +1,18 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def laplacian_matrix(G, nodelist: Incomplete | None = None, weight: str = "weight"): ... -@_dispatch +@_dispatchable def normalized_laplacian_matrix(G, nodelist: Incomplete | None = None, weight: str = "weight"): ... -@_dispatch +@_dispatchable def total_spanning_tree_weight(G, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def directed_laplacian_matrix( G, nodelist: Incomplete | None = None, weight: str = "weight", walk_type: Incomplete | None = None, alpha: float = 0.95 ): ... -@_dispatch +@_dispatchable def directed_combinatorial_laplacian_matrix( G, nodelist: Incomplete | None = None, weight: str = "weight", walk_type: Incomplete | None = None, alpha: float = 0.95 ): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/modularitymatrix.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/modularitymatrix.pyi index 581a858dfa8b..5ef6eec7c3bf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/modularitymatrix.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/modularitymatrix.pyi @@ -1,8 +1,8 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def modularity_matrix(G, nodelist: Incomplete | None = None, weight: Incomplete | None = None): ... -@_dispatch +@_dispatchable def directed_modularity_matrix(G, nodelist: Incomplete | None = None, weight: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/spectrum.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/spectrum.pyi index a7713345eb52..dae0e63001e8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/spectrum.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/linalg/spectrum.pyi @@ -1,14 +1,14 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def laplacian_spectrum(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def normalized_laplacian_spectrum(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def adjacency_spectrum(G, weight: str = "weight"): ... -@_dispatch +@_dispatchable def modularity_spectrum(G): ... -@_dispatch +@_dispatchable def bethe_hessian_spectrum(G, r: Incomplete | None = None): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi index 3afb506f9471..ad2f31f2e9a5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def generate_adjlist(G, delimiter: str = " ") -> Generator[Incomplete, None, None]: ... def write_adjlist(G, path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8") -> None: ... -@_dispatch +@_dispatchable def parse_adjlist( lines, comments: str = "#", @@ -13,7 +13,7 @@ def parse_adjlist( create_using: Incomplete | None = None, nodetype: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def read_adjlist( path, comments: str = "#", diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi index 084a08fdcbd9..c8587b307881 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ... def write_edgelist(G, path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8") -> None: ... -@_dispatch +@_dispatchable def parse_edgelist( lines, comments: str = "#", @@ -14,7 +14,7 @@ def parse_edgelist( nodetype: Incomplete | None = None, data: bool = True, ): ... -@_dispatch +@_dispatchable def read_edgelist( path, comments: str = "#", @@ -26,7 +26,7 @@ def read_edgelist( encoding: str = "utf-8", ): ... def write_weighted_edgelist(G, path, comments: str = "#", delimiter: str = " ", encoding: str = "utf-8") -> None: ... -@_dispatch +@_dispatchable def read_weighted_edgelist( path, comments: str = "#", diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi index 844dae89a6f7..8de89fcd392f 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = ["write_gexf", "read_gexf", "relabel_gexf_graph", "generate_gexf"] @@ -9,7 +9,7 @@ def write_gexf(G, path, encoding: str = "utf-8", prettyprint: bool = True, versi def generate_gexf( G, encoding: str = "utf-8", prettyprint: bool = True, version: str = "1.2draft" ) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def read_gexf(path, node_type: Incomplete | None = None, relabel: bool = False, version: str = "1.2draft"): ... class GEXF: diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi index 4cd4c6afdd2a..63fae3c7b3e1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi @@ -3,15 +3,15 @@ from collections.abc import Generator from enum import Enum from typing import Generic, NamedTuple, TypeVar -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable _T = TypeVar("_T") __all__ = ["read_gml", "parse_gml", "generate_gml", "write_gml"] -@_dispatch +@_dispatchable def read_gml(path, label: str = "label", destringizer: Incomplete | None = None): ... -@_dispatch +@_dispatchable def parse_gml(lines, label: str = "label", destringizer: Incomplete | None = None): ... class Pattern(Enum): diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi index 3ee6a86411a3..e1379b4568c9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def from_graph6_bytes(bytes_in): ... def to_graph6_bytes(G, nodes: Incomplete | None = None, header: bool = True): ... -@_dispatch +@_dispatchable def read_graph6(path): ... def write_graph6(G, path, nodes: Incomplete | None = None, header: bool = True): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi index 548b1db14ab8..2ef976b5118c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi @@ -2,7 +2,7 @@ from _typeshed import Incomplete from collections.abc import Generator from typing import Final -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable __all__ = [ "write_graphml", @@ -40,9 +40,9 @@ def generate_graphml( named_key_ids: bool = False, edge_id_from_attribute: Incomplete | None = None, ) -> Generator[Incomplete, Incomplete, None]: ... -@_dispatch +@_dispatchable def read_graphml(path, node_type=..., edge_key_type=..., force_multigraph: bool = False): ... -@_dispatch +@_dispatchable def parse_graphml(graphml_string, node_type=..., edge_key_type=..., force_multigraph: bool = False): ... class GraphML: @@ -113,7 +113,7 @@ class GraphMLWriterLxml(GraphMLWriter): ) -> None: ... def add_graph_element(self, G) -> None: ... def add_attributes(self, scope, xml_obj, data, default) -> None: ... - def dump(self) -> None: ... # type: ignore[override] # This incompatible signature is an actual issue in networkx + def dump(self, stream: Incomplete | None = None) -> None: ... write_graphml = write_graphml_lxml diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi index fa2d68e67c25..35953a37d85c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def adjacency_data(G, attrs={"id": "id", "key": "key"}): ... -@_dispatch +@_dispatchable def adjacency_graph(data, directed: bool = False, multigraph: bool = True, attrs={"id": "id", "key": "key"}): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi index 03c5dd56d88a..59ce696c83c6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi @@ -1,5 +1,5 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def cytoscape_data(G, name: str = "name", ident: str = "id"): ... -@_dispatch +@_dispatchable def cytoscape_graph(data, name: str = "name", ident: str = "id"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi index 040e13d40dcc..e37e34838277 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def node_link_data( G, *, source: str = "source", target: str = "target", name: str = "id", key: str = "key", link: str = "links" ): ... -@_dispatch +@_dispatchable def node_link_graph( data, directed: bool = False, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi index 2c8d342e58a7..c9e503fa7270 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi @@ -1,5 +1,5 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def tree_data(G, root, ident: str = "id", children: str = "children"): ... -@_dispatch +@_dispatchable def tree_graph(data, ident: str = "id", children: str = "children"): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/leda.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/leda.pyi index 5611384a5870..604a687efcd3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/leda.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/leda.pyi @@ -1,6 +1,6 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def read_leda(path, encoding: str = "UTF-8"): ... -@_dispatch +@_dispatchable def parse_leda(lines): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi index d1c2de83b1be..7764cac9ec73 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def generate_multiline_adjlist(G, delimiter: str = " ") -> Generator[Incomplete, None, None]: ... def write_multiline_adjlist(G, path, delimiter: str = " ", comments: str = "#", encoding: str = "utf-8") -> None: ... -@_dispatch +@_dispatchable def parse_multiline_adjlist( lines, comments: str = "#", @@ -14,7 +14,7 @@ def parse_multiline_adjlist( nodetype: Incomplete | None = None, edgetype: Incomplete | None = None, ): ... -@_dispatch +@_dispatchable def read_multiline_adjlist( path, comments: str = "#", diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi index c4a1a630d90e..f9da22dd2611 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi @@ -1,7 +1,7 @@ -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def write_p2g(G, path, encoding: str = "utf-8") -> None: ... -@_dispatch +@_dispatchable def read_p2g(path, encoding: str = "utf-8"): ... -@_dispatch +@_dispatchable def parse_p2g(lines): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi index fdce2f818ced..f48590aa91ef 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi @@ -1,11 +1,11 @@ from _typeshed import Incomplete from collections.abc import Generator -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable def generate_pajek(G) -> Generator[Incomplete, None, None]: ... def write_pajek(G, path, encoding: str = "UTF-8") -> None: ... -@_dispatch +@_dispatchable def read_pajek(path, encoding: str = "UTF-8"): ... -@_dispatch +@_dispatchable def parse_pajek(lines): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi index 7674f644e072..a1f2e30e64c1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi @@ -1,10 +1,10 @@ from _typeshed import Incomplete -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable -@_dispatch +@_dispatchable def from_sparse6_bytes(string): ... def to_sparse6_bytes(G, nodes: Incomplete | None = None, header: bool = True): ... -@_dispatch +@_dispatchable def read_sparse6(path): ... def write_sparse6(G, path, nodes: Incomplete | None = None, header: bool = True) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/relabel.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/relabel.pyi index f8402f5e4867..57aa6384395c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/relabel.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/relabel.pyi @@ -6,7 +6,7 @@ from networkx.classes.digraph import DiGraph from networkx.classes.graph import Graph from networkx.classes.multidigraph import MultiDiGraph from networkx.classes.multigraph import MultiGraph -from networkx.utils.backends import _dispatch +from networkx.utils.backends import _dispatchable _X = TypeVar("_X", bound=Hashable) _Y = TypeVar("_Y", bound=Hashable) @@ -19,7 +19,7 @@ def relabel_nodes(G: DiGraph[_X], mapping: Mapping[_X, _Y], copy: bool = True) - def relabel_nodes(G: MultiGraph[_X], mapping: Mapping[_X, _Y], copy: bool = True) -> MultiGraph[_X | _Y]: ... @overload def relabel_nodes(G: Graph[_X], mapping: Mapping[_X, _Y], copy: bool = True) -> Graph[_X | _Y]: ... -@_dispatch +@_dispatchable def convert_node_labels_to_integers( G: Graph[Hashable], first_label: int = 0, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/__init__.pyi index 1417c4af9e2e..7e234b3f75a0 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/__init__.pyi @@ -1,6 +1,25 @@ +from networkx.utils.backends import _dispatchable as _dispatchable +from networkx.utils.configs import * from networkx.utils.decorators import * from networkx.utils.heaps import * -from networkx.utils.misc import * + +# should be import * but pytype doesn't understand that _clear_cache is part of __all__ +from networkx.utils.misc import ( + PythonRandomInterface as PythonRandomInterface, + PythonRandomViaNumpyBits as PythonRandomViaNumpyBits, + _clear_cache as _clear_cache, + arbitrary_element as arbitrary_element, + create_py_random_state as create_py_random_state, + create_random_state as create_random_state, + dict_to_numpy_array as dict_to_numpy_array, + edges_equal as edges_equal, + flatten as flatten, + graphs_equal as graphs_equal, + groups as groups, + make_list_of_ints as make_list_of_ints, + nodes_equal as nodes_equal, + pairwise as pairwise, +) from networkx.utils.random_sequence import * from networkx.utils.rcm import * from networkx.utils.union_find import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi index bec848c0a8e2..b0a280ab9127 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi @@ -5,9 +5,9 @@ from typing_extensions import ParamSpec, Self _P = ParamSpec("_P") _R = TypeVar("_R") -__all__ = ["_dispatch"] +__all__ = ["_dispatchable"] -class _dispatch(Generic[_P, _R]): +class _dispatchable(Generic[_P, _R]): __defaults__: Incomplete __kwdefaults__: Incomplete __module__: Incomplete @@ -20,12 +20,13 @@ class _dispatch(Generic[_P, _R]): preserve_edge_attrs: bool preserve_node_attrs: bool preserve_graph_attrs: bool + mutates_input: bool optional_graphs: Incomplete list_graphs: Incomplete graphs: dict[str, int] backends: dict[str, Incomplete] # Incomplete: Ignoring the case where func=None returns a partial, - # we only care about `_dispatch` used as a static-typing decorator + # we only care about `_dispatchable` used as a static-typing decorator def __new__( cls, func: Callable[_P, _R] | None = None, @@ -38,6 +39,8 @@ class _dispatch(Generic[_P, _R]): preserve_node_attrs: bool = False, preserve_graph_attrs: bool = False, preserve_all_attrs: bool = False, + mutates_input: bool = False, + returns_graph: bool = False, ) -> Self: ... @property def __doc__(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi new file mode 100644 index 000000000000..c9f8cb49d2dd --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/configs.pyi @@ -0,0 +1,32 @@ +from _typeshed import Incomplete +from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, ValuesView +from typing_extensions import Self + +__all__ = ["Config", "config"] + +class Config(Mapping[str, Incomplete]): + def __init_subclass__(cls, strict: bool = True) -> None: ... + def __new__(cls, **kwargs) -> Self: ... + def __dir__(self) -> Iterable[str]: ... + def __setattr__(self, name: str, value) -> None: ... + def __delattr__(self, name: str) -> None: ... + def __contains__(self, key: object) -> bool: ... + def __iter__(self) -> Iterator[str]: ... + def __len__(self) -> int: ... + def __reversed__(self) -> Iterator[str]: ... + def __getitem__(self, key: str): ... + def __setitem__(self, key: str, value) -> None: ... + def __delitem__(self, key: str) -> None: ... + def get(self, key: str, default: Incomplete | None = None): ... + def items(self) -> ItemsView[str, Incomplete]: ... + def keys(self) -> KeysView[str]: ... + def values(self) -> ValuesView[Incomplete]: ... + +class NetworkXConfig(Config): + backend_priority: list[str] + backends: Config + cache_converted_graphs: bool + def __init__(self, *, backend_priority: list[str], backends: Config, cache_converted_graphs: bool) -> None: ... + def __new__(cls, *, backend_priority: list[str], backends: Config, cache_converted_graphs: bool) -> Self: ... + +config: NetworkXConfig diff --git a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi index eb5414bc7bbc..261e030b1df2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi @@ -5,6 +5,23 @@ from typing_extensions import TypeAlias import numpy +__all__ = [ + "flatten", + "make_list_of_ints", + "dict_to_numpy_array", + "arbitrary_element", + "pairwise", + "groups", + "create_random_state", + "create_py_random_state", + "PythonRandomInterface", + "PythonRandomViaNumpyBits", + "nodes_equal", + "edges_equal", + "graphs_equal", + "_clear_cache", +] + _RandomNumberGenerator: TypeAlias = ( ModuleType | random.Random | numpy.random.RandomState | numpy.random.Generator | PythonRandomInterface ) @@ -18,6 +35,10 @@ def pairwise(iterable, cyclic: bool = False): ... def groups(many_to_one): ... def create_random_state(random_state: Incomplete | None = None): ... +class PythonRandomViaNumpyBits(random.Random): + def __init__(self, rng: numpy.random.Generator | None = None) -> None: ... + def getrandbits(self, k: int) -> int: ... + class PythonRandomInterface: def __init__(self, rng: Incomplete | None = None) -> None: ... def random(self): ... @@ -35,3 +56,4 @@ def create_py_random_state(random_state: _RandomState = None): ... def nodes_equal(nodes1, nodes2): ... def edges_equal(edges1, edges2): ... def graphs_equal(graph1, graph2): ... +def _clear_cache(G) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/peewee/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/peewee/METADATA.toml index 56d2e87948dd..e40722fa5d0b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/peewee/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/peewee/METADATA.toml @@ -1,4 +1,4 @@ -version = "3.17.6" +version = "3.17.7" upstream_repository = "https://github.com/coleifer/peewee" # We're not providing stubs for all playhouse modules right now # https://github.com/python/typeshed/pull/11731#issuecomment-2065729058 diff --git a/packages/pyright-internal/typeshed-fallback/stubs/peewee/peewee.pyi b/packages/pyright-internal/typeshed-fallback/stubs/peewee/peewee.pyi index 8299d6ca796a..c02589ccf54d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/peewee/peewee.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/peewee/peewee.pyi @@ -135,7 +135,7 @@ class Star(Node): class Source(Node): c: Incomplete def __init__(self, alias: Incomplete | None = ...) -> None: ... - def alias(self, name) -> None: ... + def alias(self, name) -> Self: ... def select(self, *columns): ... @property def __star__(self) -> Star: ... @@ -148,7 +148,7 @@ class Source(Node): class _HashableSource: def __init__(self, *args, **kwargs) -> None: ... - def alias(self, name) -> None: ... + def alias(self, name) -> Self: ... def __hash__(self) -> int: ... def __eq__(self, other) -> Expression | bool: ... # type: ignore[override] def __ne__(self, other) -> Expression | bool: ... # type: ignore[override] @@ -178,7 +178,7 @@ class _BoundTableContext(_callable_context_manager): self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None ) -> None: ... -class Table(_HashableSource, BaseTable): +class Table(_HashableSource, BaseTable): # type: ignore[misc] __name__: Incomplete c: Incomplete primary_key: Incomplete @@ -210,12 +210,12 @@ class Join(BaseTable): def on(self, predicate): ... def __sql__(self, ctx): ... -class ValuesList(_HashableSource, BaseTable): +class ValuesList(_HashableSource, BaseTable): # type: ignore[misc] def __init__(self, values, columns: Incomplete | None = ..., alias: Incomplete | None = ...) -> None: ... - def columns(self, *names) -> None: ... + def columns(self, *names) -> Self: ... def __sql__(self, ctx): ... -class CTE(_HashableSource, Source): +class CTE(_HashableSource, Source): # type: ignore[misc] def __init__( self, name, query, recursive: bool = ..., columns: Incomplete | None = ..., materialized: Incomplete | None = ... ) -> None: ... @@ -227,7 +227,7 @@ class CTE(_HashableSource, Source): def __sql__(self, ctx): ... class ColumnBase(Node): - def converter(self, converter: Incomplete | None = ...) -> None: ... + def converter(self, converter: Incomplete | None = ...) -> Self: ... def alias(self, alias): ... def unalias(self): ... def bind_to(self, dest): ... @@ -395,9 +395,9 @@ class Function(ColumnBase): arguments: Incomplete def __init__(self, name, arguments, coerce: bool = ..., python_value: Incomplete | None = ...) -> None: ... def __getattr__(self, attr: str): ... - def filter(self, where: Incomplete | None = ...) -> None: ... - def order_by(self, *ordering) -> None: ... - def python_value(self, func: Incomplete | None = ...) -> None: ... + def filter(self, where: Incomplete | None = ...) -> Self: ... + def order_by(self, *ordering) -> Self: ... + def python_value(self, func: Incomplete | None = ...) -> Self: ... def over( self, partition_by: Incomplete | None = ..., @@ -438,11 +438,11 @@ class Window(Node): _inline: bool = ..., ) -> None: ... def alias(self, alias: Incomplete | None = ...): ... - def as_range(self) -> None: ... - def as_rows(self) -> None: ... - def as_groups(self) -> None: ... - def extends(self, window: Incomplete | None = ...) -> None: ... - def exclude(self, frame_exclusion: Incomplete | None = ...) -> None: ... + def as_range(self) -> Self: ... + def as_rows(self) -> Self: ... + def as_groups(self) -> Self: ... + def extends(self, window: Incomplete | None = ...) -> Self: ... + def exclude(self, frame_exclusion: Incomplete | None = ...) -> Self: ... @staticmethod def following(value: Incomplete | None = ...): ... @staticmethod @@ -487,7 +487,7 @@ EXCLUDED: Incomplete class DQ(ColumnBase): query: Incomplete def __init__(self, **query) -> None: ... - def __invert__(self) -> None: ... + def __invert__(self) -> Self: ... def clone(self): ... Tuple: Incomplete @@ -508,22 +508,22 @@ class OnConflict(Node): ) -> None: ... def get_conflict_statement(self, ctx, query): ... def get_conflict_update(self, ctx, query): ... - def preserve(self, *columns) -> None: ... - def update(self, _data: Incomplete | None = ..., **kwargs) -> None: ... - def where(self, *expressions) -> None: ... - def conflict_target(self, *constraints) -> None: ... - def conflict_where(self, *expressions) -> None: ... - def conflict_constraint(self, constraint) -> None: ... + def preserve(self, *columns) -> Self: ... + def update(self, _data: Incomplete | None = ..., **kwargs) -> Self: ... + def where(self, *expressions) -> Self: ... + def conflict_target(self, *constraints) -> Self: ... + def conflict_where(self, *expressions) -> Self: ... + def conflict_constraint(self, constraint) -> Self: ... class BaseQuery(Node): default_row_type: Incomplete def __init__(self, _database: Incomplete | None = ..., **kwargs) -> None: ... def bind(self, database: Incomplete | None = ...): ... def clone(self): ... - def dicts(self, as_dict: bool = ...): ... - def tuples(self, as_tuple: bool = ...): ... - def namedtuples(self, as_namedtuple: bool = ...): ... - def objects(self, constructor: Incomplete | None = ...): ... + def dicts(self, as_dict: bool = ...) -> Self: ... + def tuples(self, as_tuple: bool = ...) -> Self: ... + def namedtuples(self, as_namedtuple: bool = ...) -> Self: ... + def objects(self, constructor: Incomplete | None = ...) -> Self: ... def __sql__(self, ctx) -> None: ... def sql(self): ... def execute(self, database): ... @@ -545,14 +545,14 @@ class Query(BaseQuery): offset: Incomplete | None = ..., **kwargs, ) -> None: ... - def with_cte(self, *cte_list) -> None: ... - def where(self, *expressions) -> None: ... - def orwhere(self, *expressions) -> None: ... - def order_by(self, *values) -> None: ... - def order_by_extend(self, *values) -> None: ... - def limit(self, value: Incomplete | None = ...) -> None: ... - def offset(self, value: Incomplete | None = ...) -> None: ... - def paginate(self, page, paginate_by: int = ...) -> None: ... + def with_cte(self, *cte_list) -> Self: ... + def where(self, *expressions) -> Self: ... + def orwhere(self, *expressions) -> Self: ... + def order_by(self, *values) -> Self: ... + def order_by_extend(self, *values) -> Self: ... + def limit(self, value: Incomplete | None = ...) -> Self: ... + def offset(self, value: Incomplete | None = ...) -> Self: ... + def paginate(self, page, paginate_by: int = ...) -> Self: ... def __sql__(self, ctx): ... class SelectQuery(Query): @@ -570,7 +570,7 @@ class SelectQuery(Query): __rsub__: Incomplete def select_from(self, *columns): ... -class SelectBase(_HashableSource, Source, SelectQuery): +class SelectBase(_HashableSource, Source, SelectQuery): # type: ignore[misc] def peek(self, database, n: int = ...): ... def first(self, database, n: int = ...): ... def scalar(self, database, as_tuple: bool = ..., as_dict: bool = ...): ... @@ -603,23 +603,23 @@ class Select(SelectBase): **kwargs, ) -> None: ... def clone(self): ... - def columns(self, *columns, **kwargs) -> None: ... + def columns(self, *columns, **kwargs) -> Self: ... select: Incomplete - def select_extend(self, *columns) -> None: ... + def select_extend(self, *columns) -> Self: ... @property def selected_columns(self): ... @selected_columns.setter def selected_columns(self, value) -> None: ... - def from_(self, *sources) -> None: ... - def join(self, dest, join_type=..., on: Incomplete | None = ...) -> None: ... + def from_(self, *sources) -> Self: ... + def join(self, dest, join_type=..., on: Incomplete | None = ...) -> Self: ... def left_outer_join(self, dest, on: Incomplete | None = ...): ... - def group_by(self, *columns) -> None: ... + def group_by(self, *columns) -> Self: ... def group_by_extend(self, *values): ... - def having(self, *expressions) -> None: ... - def distinct(self, *columns) -> None: ... - def window(self, *windows) -> None: ... - def for_update(self, for_update: bool = ..., of: Incomplete | None = ..., nowait: Incomplete | None = ...) -> None: ... - def lateral(self, lateral: bool = ...) -> None: ... + def having(self, *expressions) -> Self: ... + def distinct(self, *columns) -> Self: ... + def window(self, *windows) -> Self: ... + def for_update(self, for_update: bool = ..., of: Incomplete | None = ..., nowait: Incomplete | None = ...) -> Self: ... + def lateral(self, lateral: bool = ...) -> Self: ... def __sql_selection__(self, ctx, is_subquery: bool = ...): ... def __sql__(self, ctx): ... @@ -627,7 +627,7 @@ class _WriteQuery(Query): table: Incomplete def __init__(self, table, returning: Incomplete | None = ..., **kwargs) -> None: ... def cte(self, name, recursive: bool = ..., columns: Incomplete | None = ..., materialized: Incomplete | None = ...): ... - def returning(self, *returning) -> None: ... + def returning(self, *returning) -> Self: ... def apply_returning(self, ctx): ... def execute_returning(self, database): ... def handle_result(self, database, cursor): ... @@ -635,7 +635,7 @@ class _WriteQuery(Query): class Update(_WriteQuery): def __init__(self, table, update: Incomplete | None = ..., **kwargs) -> None: ... - def from_(self, *sources) -> None: ... + def from_(self, *sources) -> Self: ... def __sql__(self, ctx): ... class Insert(_WriteQuery): @@ -653,11 +653,11 @@ class Insert(_WriteQuery): on_conflict: Incomplete | None = ..., **kwargs, ) -> None: ... - def where(self, *expressions) -> None: ... - def as_rowcount(self, _as_rowcount: bool = ...) -> None: ... - def on_conflict_ignore(self, ignore: bool = ...) -> None: ... - def on_conflict_replace(self, replace: bool = ...) -> None: ... - def on_conflict(self, *args, **kwargs) -> None: ... + def where(self, *expressions) -> None: ... # type: ignore[override] + def as_rowcount(self, _as_rowcount: bool = ...) -> Self: ... + def on_conflict_ignore(self, ignore: bool = ...) -> Self: ... + def on_conflict_replace(self, replace: bool = ...) -> Self: ... + def on_conflict(self, *args, **kwargs) -> Self: ... def get_default_data(self): ... def get_default_columns(self): ... def __sql__(self, ctx): ... @@ -677,9 +677,9 @@ class Index(Node): where: Incomplete | None = ..., using: Incomplete | None = ..., ) -> None: ... - def safe(self, _safe: bool = ...) -> None: ... - def where(self, *expressions) -> None: ... - def using(self, _using: Incomplete | None = ...) -> None: ... + def safe(self, _safe: bool = ...) -> Self: ... + def where(self, *expressions) -> Self: ... + def using(self, _using: Incomplete | None = ...) -> Self: ... def __sql__(self, ctx): ... class ModelIndex(Index): @@ -1723,9 +1723,9 @@ class FieldAlias(Field): class _ModelQueryHelper: default_row_type: Incomplete def __init__(self, *args, **kwargs) -> None: ... - def objects(self, constructor: Incomplete | None = ...) -> None: ... + def objects(self, constructor: Incomplete | None = ...) -> Self: ... -class ModelRaw(_ModelQueryHelper, RawQuery): +class ModelRaw(_ModelQueryHelper, RawQuery): # type: ignore[misc] model: Incomplete def __init__(self, model, sql, params, **kwargs) -> None: ... def get(self): ... @@ -1743,13 +1743,13 @@ class BaseModelSelect(_ModelQueryHelper): def prefetch(self, *subqueries): ... def get(self, database: Incomplete | None = ...): ... def get_or_none(self, database: Incomplete | None = ...): ... - def group_by(self, *columns) -> None: ... + def group_by(self, *columns) -> Self: ... -class ModelCompoundSelectQuery(BaseModelSelect, CompoundSelectQuery): +class ModelCompoundSelectQuery(BaseModelSelect, CompoundSelectQuery): # type: ignore[misc] model: Incomplete def __init__(self, model, *args, **kwargs) -> None: ... -class ModelSelect(BaseModelSelect, Select): +class ModelSelect(BaseModelSelect, Select): # type: ignore[misc] model: Incomplete def __init__(self, model, fields_or_models, is_default: bool = ...) -> None: ... def clone(self): ... @@ -1758,7 +1758,7 @@ class ModelSelect(BaseModelSelect, Select): def switch(self, ctx: Incomplete | None = ...): ... def join( self, dest, join_type=..., on: Incomplete | None = ..., src: Incomplete | None = ..., attr: Incomplete | None = ... - ) -> None: ... + ) -> Self: ... def left_outer_join(self, dest, on: Incomplete | None = ..., src: Incomplete | None = ..., attr: Incomplete | None = ...): ... def join_from(self, src, dest, join_type=..., on: Incomplete | None = ..., attr: Incomplete | None = ...): ... def ensure_join(self, lm, rm, on: Incomplete | None = ..., **join_kwargs): ... @@ -1775,16 +1775,16 @@ class _ModelWriteQueryHelper(_ModelQueryHelper): def __init__(self, model, *args, **kwargs) -> None: ... def returning(self, *returning): ... -class ModelUpdate(_ModelWriteQueryHelper, Update): ... +class ModelUpdate(_ModelWriteQueryHelper, Update): ... # type: ignore[misc] -class ModelInsert(_ModelWriteQueryHelper, Insert): +class ModelInsert(_ModelWriteQueryHelper, Insert): # type: ignore[misc] default_row_type: Incomplete def __init__(self, *args, **kwargs) -> None: ... def returning(self, *returning): ... def get_default_data(self): ... def get_default_columns(self): ... -class ModelDelete(_ModelWriteQueryHelper, Delete): ... +class ModelDelete(_ModelWriteQueryHelper, Delete): ... # type: ignore[misc] class ManyToManyQuery(ModelSelect): def __init__(self, instance, accessor, rel, *args, **kwargs) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/playsound/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/playsound/METADATA.toml deleted file mode 100644 index 14175f7d7a16..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/playsound/METADATA.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "1.3.*" -upstream_repository = "https://github.com/TaylorSMarks/playsound" diff --git a/packages/pyright-internal/typeshed-fallback/stubs/playsound/playsound.pyi b/packages/pyright-internal/typeshed-fallback/stubs/playsound/playsound.pyi deleted file mode 100644 index b70f7902c25b..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/playsound/playsound.pyi +++ /dev/null @@ -1,8 +0,0 @@ -import logging -import pathlib - -logger: logging.Logger - -class PlaysoundException(Exception): ... - -def playsound(sound: str | pathlib.Path, block: bool = ...) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/psutil/psutil/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/psutil/psutil/__init__.pyi index 58d48e3aac92..bebb2ccfac45 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/psutil/psutil/__init__.pyi @@ -177,7 +177,7 @@ class Process: def as_dict( self, attrs: list[str] | tuple[str, ...] | set[str] | frozenset[str] | None = None, ad_value: Incomplete | None = None ) -> dict[str, Any]: ... - def parent(self) -> Process: ... + def parent(self) -> Process | None: ... def parents(self) -> list[Process]: ... def is_running(self) -> bool: ... def ppid(self) -> int: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/METADATA.toml index 0172998471ce..86f0b80f5f82 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/METADATA.toml @@ -1,3 +1,3 @@ -version = "2.9.*" +version = "~= 2.9.10" upstream_repository = "https://github.com/psycopg/psycopg2" partial_stub = false diff --git a/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi b/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi index 9ec27532946c..6bf1be18dea2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi @@ -1,306 +1,309 @@ +from typing import Final + def lookup(code: str, _cache: dict[str, str] = {}) -> str: ... -CLASS_SUCCESSFUL_COMPLETION: str -CLASS_WARNING: str -CLASS_NO_DATA: str -CLASS_SQL_STATEMENT_NOT_YET_COMPLETE: str -CLASS_CONNECTION_EXCEPTION: str -CLASS_TRIGGERED_ACTION_EXCEPTION: str -CLASS_FEATURE_NOT_SUPPORTED: str -CLASS_INVALID_TRANSACTION_INITIATION: str -CLASS_LOCATOR_EXCEPTION: str -CLASS_INVALID_GRANTOR: str -CLASS_INVALID_ROLE_SPECIFICATION: str -CLASS_DIAGNOSTICS_EXCEPTION: str -CLASS_CASE_NOT_FOUND: str -CLASS_CARDINALITY_VIOLATION: str -CLASS_DATA_EXCEPTION: str -CLASS_INTEGRITY_CONSTRAINT_VIOLATION: str -CLASS_INVALID_CURSOR_STATE: str -CLASS_INVALID_TRANSACTION_STATE: str -CLASS_INVALID_SQL_STATEMENT_NAME: str -CLASS_TRIGGERED_DATA_CHANGE_VIOLATION: str -CLASS_INVALID_AUTHORIZATION_SPECIFICATION: str -CLASS_DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST: str -CLASS_INVALID_TRANSACTION_TERMINATION: str -CLASS_SQL_ROUTINE_EXCEPTION: str -CLASS_INVALID_CURSOR_NAME: str -CLASS_EXTERNAL_ROUTINE_EXCEPTION: str -CLASS_EXTERNAL_ROUTINE_INVOCATION_EXCEPTION: str -CLASS_SAVEPOINT_EXCEPTION: str -CLASS_INVALID_CATALOG_NAME: str -CLASS_INVALID_SCHEMA_NAME: str -CLASS_TRANSACTION_ROLLBACK: str -CLASS_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION: str -CLASS_WITH_CHECK_OPTION_VIOLATION: str -CLASS_INSUFFICIENT_RESOURCES: str -CLASS_PROGRAM_LIMIT_EXCEEDED: str -CLASS_OBJECT_NOT_IN_PREREQUISITE_STATE: str -CLASS_OPERATOR_INTERVENTION: str -CLASS_SYSTEM_ERROR: str -CLASS_SNAPSHOT_FAILURE: str -CLASS_CONFIGURATION_FILE_ERROR: str -CLASS_FOREIGN_DATA_WRAPPER_ERROR: str -CLASS_PL_PGSQL_ERROR: str -CLASS_INTERNAL_ERROR: str -SUCCESSFUL_COMPLETION: str -WARNING: str -NULL_VALUE_ELIMINATED_IN_SET_FUNCTION: str -STRING_DATA_RIGHT_TRUNCATION_: str -PRIVILEGE_NOT_REVOKED: str -PRIVILEGE_NOT_GRANTED: str -IMPLICIT_ZERO_BIT_PADDING: str -DYNAMIC_RESULT_SETS_RETURNED: str -DEPRECATED_FEATURE: str -NO_DATA: str -NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED: str -SQL_STATEMENT_NOT_YET_COMPLETE: str -CONNECTION_EXCEPTION: str -SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION: str -CONNECTION_DOES_NOT_EXIST: str -SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION: str -CONNECTION_FAILURE: str -TRANSACTION_RESOLUTION_UNKNOWN: str -PROTOCOL_VIOLATION: str -TRIGGERED_ACTION_EXCEPTION: str -FEATURE_NOT_SUPPORTED: str -INVALID_TRANSACTION_INITIATION: str -LOCATOR_EXCEPTION: str -INVALID_LOCATOR_SPECIFICATION: str -INVALID_GRANTOR: str -INVALID_GRANT_OPERATION: str -INVALID_ROLE_SPECIFICATION: str -DIAGNOSTICS_EXCEPTION: str -STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER: str -CASE_NOT_FOUND: str -CARDINALITY_VIOLATION: str -DATA_EXCEPTION: str -STRING_DATA_RIGHT_TRUNCATION: str -NULL_VALUE_NO_INDICATOR_PARAMETER: str -NUMERIC_VALUE_OUT_OF_RANGE: str -NULL_VALUE_NOT_ALLOWED_: str -ERROR_IN_ASSIGNMENT: str -INVALID_DATETIME_FORMAT: str -DATETIME_FIELD_OVERFLOW: str -INVALID_TIME_ZONE_DISPLACEMENT_VALUE: str -ESCAPE_CHARACTER_CONFLICT: str -INVALID_USE_OF_ESCAPE_CHARACTER: str -INVALID_ESCAPE_OCTET: str -ZERO_LENGTH_CHARACTER_STRING: str -MOST_SPECIFIC_TYPE_MISMATCH: str -SEQUENCE_GENERATOR_LIMIT_EXCEEDED: str -NOT_AN_XML_DOCUMENT: str -INVALID_XML_DOCUMENT: str -INVALID_XML_CONTENT: str -INVALID_XML_COMMENT: str -INVALID_XML_PROCESSING_INSTRUCTION: str -INVALID_INDICATOR_PARAMETER_VALUE: str -SUBSTRING_ERROR: str -DIVISION_BY_ZERO: str -INVALID_PRECEDING_OR_FOLLOWING_SIZE: str -INVALID_ARGUMENT_FOR_NTILE_FUNCTION: str -INTERVAL_FIELD_OVERFLOW: str -INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION: str -INVALID_CHARACTER_VALUE_FOR_CAST: str -INVALID_ESCAPE_CHARACTER: str -INVALID_REGULAR_EXPRESSION: str -INVALID_ARGUMENT_FOR_LOGARITHM: str -INVALID_ARGUMENT_FOR_POWER_FUNCTION: str -INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION: str -INVALID_ROW_COUNT_IN_LIMIT_CLAUSE: str -INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE: str -INVALID_LIMIT_VALUE: str -CHARACTER_NOT_IN_REPERTOIRE: str -INDICATOR_OVERFLOW: str -INVALID_PARAMETER_VALUE: str -UNTERMINATED_C_STRING: str -INVALID_ESCAPE_SEQUENCE: str -STRING_DATA_LENGTH_MISMATCH: str -TRIM_ERROR: str -ARRAY_SUBSCRIPT_ERROR: str -INVALID_TABLESAMPLE_REPEAT: str -INVALID_TABLESAMPLE_ARGUMENT: str -DUPLICATE_JSON_OBJECT_KEY_VALUE: str -INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION: str -INVALID_JSON_TEXT: str -INVALID_SQL_JSON_SUBSCRIPT: str -MORE_THAN_ONE_SQL_JSON_ITEM: str -NO_SQL_JSON_ITEM: str -NON_NUMERIC_SQL_JSON_ITEM: str -NON_UNIQUE_KEYS_IN_A_JSON_OBJECT: str -SINGLETON_SQL_JSON_ITEM_REQUIRED: str -SQL_JSON_ARRAY_NOT_FOUND: str -SQL_JSON_MEMBER_NOT_FOUND: str -SQL_JSON_NUMBER_NOT_FOUND: str -SQL_JSON_OBJECT_NOT_FOUND: str -TOO_MANY_JSON_ARRAY_ELEMENTS: str -TOO_MANY_JSON_OBJECT_MEMBERS: str -SQL_JSON_SCALAR_REQUIRED: str -FLOATING_POINT_EXCEPTION: str -INVALID_TEXT_REPRESENTATION: str -INVALID_BINARY_REPRESENTATION: str -BAD_COPY_FILE_FORMAT: str -UNTRANSLATABLE_CHARACTER: str -NONSTANDARD_USE_OF_ESCAPE_CHARACTER: str -INTEGRITY_CONSTRAINT_VIOLATION: str -RESTRICT_VIOLATION: str -NOT_NULL_VIOLATION: str -FOREIGN_KEY_VIOLATION: str -UNIQUE_VIOLATION: str -CHECK_VIOLATION: str -EXCLUSION_VIOLATION: str -INVALID_CURSOR_STATE: str -INVALID_TRANSACTION_STATE: str -ACTIVE_SQL_TRANSACTION: str -BRANCH_TRANSACTION_ALREADY_ACTIVE: str -INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION: str -INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION: str -NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION: str -READ_ONLY_SQL_TRANSACTION: str -SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED: str -HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL: str -NO_ACTIVE_SQL_TRANSACTION: str -IN_FAILED_SQL_TRANSACTION: str -IDLE_IN_TRANSACTION_SESSION_TIMEOUT: str -INVALID_SQL_STATEMENT_NAME: str -TRIGGERED_DATA_CHANGE_VIOLATION: str -INVALID_AUTHORIZATION_SPECIFICATION: str -INVALID_PASSWORD: str -DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST: str -DEPENDENT_OBJECTS_STILL_EXIST: str -INVALID_TRANSACTION_TERMINATION: str -SQL_ROUTINE_EXCEPTION: str -MODIFYING_SQL_DATA_NOT_PERMITTED_: str -PROHIBITED_SQL_STATEMENT_ATTEMPTED_: str -READING_SQL_DATA_NOT_PERMITTED_: str -FUNCTION_EXECUTED_NO_RETURN_STATEMENT: str -INVALID_CURSOR_NAME: str -EXTERNAL_ROUTINE_EXCEPTION: str -CONTAINING_SQL_NOT_PERMITTED: str -MODIFYING_SQL_DATA_NOT_PERMITTED: str -PROHIBITED_SQL_STATEMENT_ATTEMPTED: str -READING_SQL_DATA_NOT_PERMITTED: str -EXTERNAL_ROUTINE_INVOCATION_EXCEPTION: str -INVALID_SQLSTATE_RETURNED: str -NULL_VALUE_NOT_ALLOWED: str -TRIGGER_PROTOCOL_VIOLATED: str -SRF_PROTOCOL_VIOLATED: str -EVENT_TRIGGER_PROTOCOL_VIOLATED: str -SAVEPOINT_EXCEPTION: str -INVALID_SAVEPOINT_SPECIFICATION: str -INVALID_CATALOG_NAME: str -INVALID_SCHEMA_NAME: str -TRANSACTION_ROLLBACK: str -SERIALIZATION_FAILURE: str -TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION: str -STATEMENT_COMPLETION_UNKNOWN: str -DEADLOCK_DETECTED: str -SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION: str -INSUFFICIENT_PRIVILEGE: str -SYNTAX_ERROR: str -INVALID_NAME: str -INVALID_COLUMN_DEFINITION: str -NAME_TOO_LONG: str -DUPLICATE_COLUMN: str -AMBIGUOUS_COLUMN: str -UNDEFINED_COLUMN: str -UNDEFINED_OBJECT: str -DUPLICATE_OBJECT: str -DUPLICATE_ALIAS: str -DUPLICATE_FUNCTION: str -AMBIGUOUS_FUNCTION: str -GROUPING_ERROR: str -DATATYPE_MISMATCH: str -WRONG_OBJECT_TYPE: str -INVALID_FOREIGN_KEY: str -CANNOT_COERCE: str -UNDEFINED_FUNCTION: str -GENERATED_ALWAYS: str -RESERVED_NAME: str -UNDEFINED_TABLE: str -UNDEFINED_PARAMETER: str -DUPLICATE_CURSOR: str -DUPLICATE_DATABASE: str -DUPLICATE_PREPARED_STATEMENT: str -DUPLICATE_SCHEMA: str -DUPLICATE_TABLE: str -AMBIGUOUS_PARAMETER: str -AMBIGUOUS_ALIAS: str -INVALID_COLUMN_REFERENCE: str -INVALID_CURSOR_DEFINITION: str -INVALID_DATABASE_DEFINITION: str -INVALID_FUNCTION_DEFINITION: str -INVALID_PREPARED_STATEMENT_DEFINITION: str -INVALID_SCHEMA_DEFINITION: str -INVALID_TABLE_DEFINITION: str -INVALID_OBJECT_DEFINITION: str -INDETERMINATE_DATATYPE: str -INVALID_RECURSION: str -WINDOWING_ERROR: str -COLLATION_MISMATCH: str -INDETERMINATE_COLLATION: str -WITH_CHECK_OPTION_VIOLATION: str -INSUFFICIENT_RESOURCES: str -DISK_FULL: str -OUT_OF_MEMORY: str -TOO_MANY_CONNECTIONS: str -CONFIGURATION_LIMIT_EXCEEDED: str -PROGRAM_LIMIT_EXCEEDED: str -STATEMENT_TOO_COMPLEX: str -TOO_MANY_COLUMNS: str -TOO_MANY_ARGUMENTS: str -OBJECT_NOT_IN_PREREQUISITE_STATE: str -OBJECT_IN_USE: str -CANT_CHANGE_RUNTIME_PARAM: str -LOCK_NOT_AVAILABLE: str -UNSAFE_NEW_ENUM_VALUE_USAGE: str -OPERATOR_INTERVENTION: str -QUERY_CANCELED: str -ADMIN_SHUTDOWN: str -CRASH_SHUTDOWN: str -CANNOT_CONNECT_NOW: str -DATABASE_DROPPED: str -SYSTEM_ERROR: str -IO_ERROR: str -UNDEFINED_FILE: str -DUPLICATE_FILE: str -SNAPSHOT_TOO_OLD: str -CONFIG_FILE_ERROR: str -LOCK_FILE_EXISTS: str -FDW_ERROR: str -FDW_OUT_OF_MEMORY: str -FDW_DYNAMIC_PARAMETER_VALUE_NEEDED: str -FDW_INVALID_DATA_TYPE: str -FDW_COLUMN_NAME_NOT_FOUND: str -FDW_INVALID_DATA_TYPE_DESCRIPTORS: str -FDW_INVALID_COLUMN_NAME: str -FDW_INVALID_COLUMN_NUMBER: str -FDW_INVALID_USE_OF_NULL_POINTER: str -FDW_INVALID_STRING_FORMAT: str -FDW_INVALID_HANDLE: str -FDW_INVALID_OPTION_INDEX: str -FDW_INVALID_OPTION_NAME: str -FDW_OPTION_NAME_NOT_FOUND: str -FDW_REPLY_HANDLE: str -FDW_UNABLE_TO_CREATE_EXECUTION: str -FDW_UNABLE_TO_CREATE_REPLY: str -FDW_UNABLE_TO_ESTABLISH_CONNECTION: str -FDW_NO_SCHEMAS: str -FDW_SCHEMA_NOT_FOUND: str -FDW_TABLE_NOT_FOUND: str -FDW_FUNCTION_SEQUENCE_ERROR: str -FDW_TOO_MANY_HANDLES: str -FDW_INCONSISTENT_DESCRIPTOR_INFORMATION: str -FDW_INVALID_ATTRIBUTE_VALUE: str -FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH: str -FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER: str -PLPGSQL_ERROR: str -RAISE_EXCEPTION: str -NO_DATA_FOUND: str -TOO_MANY_ROWS: str -ASSERT_FAILURE: str -INTERNAL_ERROR: str -DATA_CORRUPTED: str -INDEX_CORRUPTED: str -IDLE_SESSION_TIMEOUT: str -SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE: str +CLASS_SUCCESSFUL_COMPLETION: Final[str] +CLASS_WARNING: Final[str] +CLASS_NO_DATA: Final[str] +CLASS_SQL_STATEMENT_NOT_YET_COMPLETE: Final[str] +CLASS_CONNECTION_EXCEPTION: Final[str] +CLASS_TRIGGERED_ACTION_EXCEPTION: Final[str] +CLASS_FEATURE_NOT_SUPPORTED: Final[str] +CLASS_INVALID_TRANSACTION_INITIATION: Final[str] +CLASS_LOCATOR_EXCEPTION: Final[str] +CLASS_INVALID_GRANTOR: Final[str] +CLASS_INVALID_ROLE_SPECIFICATION: Final[str] +CLASS_DIAGNOSTICS_EXCEPTION: Final[str] +CLASS_CASE_NOT_FOUND: Final[str] +CLASS_CARDINALITY_VIOLATION: Final[str] +CLASS_DATA_EXCEPTION: Final[str] +CLASS_INTEGRITY_CONSTRAINT_VIOLATION: Final[str] +CLASS_INVALID_CURSOR_STATE: Final[str] +CLASS_INVALID_TRANSACTION_STATE: Final[str] +CLASS_INVALID_SQL_STATEMENT_NAME: Final[str] +CLASS_TRIGGERED_DATA_CHANGE_VIOLATION: Final[str] +CLASS_INVALID_AUTHORIZATION_SPECIFICATION: Final[str] +CLASS_DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST: Final[str] +CLASS_INVALID_TRANSACTION_TERMINATION: Final[str] +CLASS_SQL_ROUTINE_EXCEPTION: Final[str] +CLASS_INVALID_CURSOR_NAME: Final[str] +CLASS_EXTERNAL_ROUTINE_EXCEPTION: Final[str] +CLASS_EXTERNAL_ROUTINE_INVOCATION_EXCEPTION: Final[str] +CLASS_SAVEPOINT_EXCEPTION: Final[str] +CLASS_INVALID_CATALOG_NAME: Final[str] +CLASS_INVALID_SCHEMA_NAME: Final[str] +CLASS_TRANSACTION_ROLLBACK: Final[str] +CLASS_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION: Final[str] +CLASS_WITH_CHECK_OPTION_VIOLATION: Final[str] +CLASS_INSUFFICIENT_RESOURCES: Final[str] +CLASS_PROGRAM_LIMIT_EXCEEDED: Final[str] +CLASS_OBJECT_NOT_IN_PREREQUISITE_STATE: Final[str] +CLASS_OPERATOR_INTERVENTION: Final[str] +CLASS_SYSTEM_ERROR: Final[str] +CLASS_SNAPSHOT_FAILURE: Final[str] +CLASS_CONFIGURATION_FILE_ERROR: Final[str] +CLASS_FOREIGN_DATA_WRAPPER_ERROR: Final[str] +CLASS_PL_PGSQL_ERROR: Final[str] +CLASS_INTERNAL_ERROR: Final[str] +SUCCESSFUL_COMPLETION: Final[str] +WARNING: Final[str] +NULL_VALUE_ELIMINATED_IN_SET_FUNCTION: Final[str] +STRING_DATA_RIGHT_TRUNCATION_: Final[str] +PRIVILEGE_NOT_REVOKED: Final[str] +PRIVILEGE_NOT_GRANTED: Final[str] +IMPLICIT_ZERO_BIT_PADDING: Final[str] +DYNAMIC_RESULT_SETS_RETURNED: Final[str] +DEPRECATED_FEATURE: Final[str] +NO_DATA: Final[str] +NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED: Final[str] +SQL_STATEMENT_NOT_YET_COMPLETE: Final[str] +CONNECTION_EXCEPTION: Final[str] +SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION: Final[str] +CONNECTION_DOES_NOT_EXIST: Final[str] +SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION: Final[str] +CONNECTION_FAILURE: Final[str] +TRANSACTION_RESOLUTION_UNKNOWN: Final[str] +PROTOCOL_VIOLATION: Final[str] +TRIGGERED_ACTION_EXCEPTION: Final[str] +FEATURE_NOT_SUPPORTED: Final[str] +INVALID_TRANSACTION_INITIATION: Final[str] +LOCATOR_EXCEPTION: Final[str] +INVALID_LOCATOR_SPECIFICATION: Final[str] +INVALID_GRANTOR: Final[str] +INVALID_GRANT_OPERATION: Final[str] +INVALID_ROLE_SPECIFICATION: Final[str] +DIAGNOSTICS_EXCEPTION: Final[str] +STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER: Final[str] +CASE_NOT_FOUND: Final[str] +CARDINALITY_VIOLATION: Final[str] +DATA_EXCEPTION: Final[str] +STRING_DATA_RIGHT_TRUNCATION: Final[str] +NULL_VALUE_NO_INDICATOR_PARAMETER: Final[str] +NUMERIC_VALUE_OUT_OF_RANGE: Final[str] +NULL_VALUE_NOT_ALLOWED_: Final[str] +ERROR_IN_ASSIGNMENT: Final[str] +INVALID_DATETIME_FORMAT: Final[str] +DATETIME_FIELD_OVERFLOW: Final[str] +INVALID_TIME_ZONE_DISPLACEMENT_VALUE: Final[str] +ESCAPE_CHARACTER_CONFLICT: Final[str] +INVALID_USE_OF_ESCAPE_CHARACTER: Final[str] +INVALID_ESCAPE_OCTET: Final[str] +ZERO_LENGTH_CHARACTER_STRING: Final[str] +MOST_SPECIFIC_TYPE_MISMATCH: Final[str] +SEQUENCE_GENERATOR_LIMIT_EXCEEDED: Final[str] +NOT_AN_XML_DOCUMENT: Final[str] +INVALID_XML_DOCUMENT: Final[str] +INVALID_XML_CONTENT: Final[str] +INVALID_XML_COMMENT: Final[str] +INVALID_XML_PROCESSING_INSTRUCTION: Final[str] +INVALID_INDICATOR_PARAMETER_VALUE: Final[str] +SUBSTRING_ERROR: Final[str] +DIVISION_BY_ZERO: Final[str] +INVALID_PRECEDING_OR_FOLLOWING_SIZE: Final[str] +INVALID_ARGUMENT_FOR_NTILE_FUNCTION: Final[str] +INTERVAL_FIELD_OVERFLOW: Final[str] +INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION: Final[str] +INVALID_CHARACTER_VALUE_FOR_CAST: Final[str] +INVALID_ESCAPE_CHARACTER: Final[str] +INVALID_REGULAR_EXPRESSION: Final[str] +INVALID_ARGUMENT_FOR_LOGARITHM: Final[str] +INVALID_ARGUMENT_FOR_POWER_FUNCTION: Final[str] +INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION: Final[str] +INVALID_ROW_COUNT_IN_LIMIT_CLAUSE: Final[str] +INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE: Final[str] +INVALID_LIMIT_VALUE: Final[str] +CHARACTER_NOT_IN_REPERTOIRE: Final[str] +INDICATOR_OVERFLOW: Final[str] +INVALID_PARAMETER_VALUE: Final[str] +UNTERMINATED_C_STRING: Final[str] +INVALID_ESCAPE_SEQUENCE: Final[str] +STRING_DATA_LENGTH_MISMATCH: Final[str] +TRIM_ERROR: Final[str] +ARRAY_SUBSCRIPT_ERROR: Final[str] +INVALID_TABLESAMPLE_REPEAT: Final[str] +INVALID_TABLESAMPLE_ARGUMENT: Final[str] +DUPLICATE_JSON_OBJECT_KEY_VALUE: Final[str] +INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION: Final[str] +INVALID_JSON_TEXT: Final[str] +INVALID_SQL_JSON_SUBSCRIPT: Final[str] +MORE_THAN_ONE_SQL_JSON_ITEM: Final[str] +NO_SQL_JSON_ITEM: Final[str] +NON_NUMERIC_SQL_JSON_ITEM: Final[str] +NON_UNIQUE_KEYS_IN_A_JSON_OBJECT: Final[str] +SINGLETON_SQL_JSON_ITEM_REQUIRED: Final[str] +SQL_JSON_ARRAY_NOT_FOUND: Final[str] +SQL_JSON_MEMBER_NOT_FOUND: Final[str] +SQL_JSON_NUMBER_NOT_FOUND: Final[str] +SQL_JSON_OBJECT_NOT_FOUND: Final[str] +TOO_MANY_JSON_ARRAY_ELEMENTS: Final[str] +TOO_MANY_JSON_OBJECT_MEMBERS: Final[str] +SQL_JSON_SCALAR_REQUIRED: Final[str] +FLOATING_POINT_EXCEPTION: Final[str] +INVALID_TEXT_REPRESENTATION: Final[str] +INVALID_BINARY_REPRESENTATION: Final[str] +BAD_COPY_FILE_FORMAT: Final[str] +UNTRANSLATABLE_CHARACTER: Final[str] +NONSTANDARD_USE_OF_ESCAPE_CHARACTER: Final[str] +INTEGRITY_CONSTRAINT_VIOLATION: Final[str] +RESTRICT_VIOLATION: Final[str] +NOT_NULL_VIOLATION: Final[str] +FOREIGN_KEY_VIOLATION: Final[str] +UNIQUE_VIOLATION: Final[str] +CHECK_VIOLATION: Final[str] +EXCLUSION_VIOLATION: Final[str] +INVALID_CURSOR_STATE: Final[str] +INVALID_TRANSACTION_STATE: Final[str] +ACTIVE_SQL_TRANSACTION: Final[str] +BRANCH_TRANSACTION_ALREADY_ACTIVE: Final[str] +INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION: Final[str] +INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION: Final[str] +NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION: Final[str] +READ_ONLY_SQL_TRANSACTION: Final[str] +SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED: Final[str] +HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL: Final[str] +NO_ACTIVE_SQL_TRANSACTION: Final[str] +IN_FAILED_SQL_TRANSACTION: Final[str] +IDLE_IN_TRANSACTION_SESSION_TIMEOUT: Final[str] +INVALID_SQL_STATEMENT_NAME: Final[str] +TRIGGERED_DATA_CHANGE_VIOLATION: Final[str] +INVALID_AUTHORIZATION_SPECIFICATION: Final[str] +INVALID_PASSWORD: Final[str] +DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST: Final[str] +DEPENDENT_OBJECTS_STILL_EXIST: Final[str] +INVALID_TRANSACTION_TERMINATION: Final[str] +SQL_ROUTINE_EXCEPTION: Final[str] +MODIFYING_SQL_DATA_NOT_PERMITTED_: Final[str] +PROHIBITED_SQL_STATEMENT_ATTEMPTED_: Final[str] +READING_SQL_DATA_NOT_PERMITTED_: Final[str] +FUNCTION_EXECUTED_NO_RETURN_STATEMENT: Final[str] +INVALID_CURSOR_NAME: Final[str] +EXTERNAL_ROUTINE_EXCEPTION: Final[str] +CONTAINING_SQL_NOT_PERMITTED: Final[str] +MODIFYING_SQL_DATA_NOT_PERMITTED: Final[str] +PROHIBITED_SQL_STATEMENT_ATTEMPTED: Final[str] +READING_SQL_DATA_NOT_PERMITTED: Final[str] +EXTERNAL_ROUTINE_INVOCATION_EXCEPTION: Final[str] +INVALID_SQLSTATE_RETURNED: Final[str] +NULL_VALUE_NOT_ALLOWED: Final[str] +TRIGGER_PROTOCOL_VIOLATED: Final[str] +SRF_PROTOCOL_VIOLATED: Final[str] +EVENT_TRIGGER_PROTOCOL_VIOLATED: Final[str] +SAVEPOINT_EXCEPTION: Final[str] +INVALID_SAVEPOINT_SPECIFICATION: Final[str] +INVALID_CATALOG_NAME: Final[str] +INVALID_SCHEMA_NAME: Final[str] +TRANSACTION_ROLLBACK: Final[str] +SERIALIZATION_FAILURE: Final[str] +TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION: Final[str] +STATEMENT_COMPLETION_UNKNOWN: Final[str] +DEADLOCK_DETECTED: Final[str] +SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION: Final[str] +INSUFFICIENT_PRIVILEGE: Final[str] +SYNTAX_ERROR: Final[str] +INVALID_NAME: Final[str] +INVALID_COLUMN_DEFINITION: Final[str] +NAME_TOO_LONG: Final[str] +DUPLICATE_COLUMN: Final[str] +AMBIGUOUS_COLUMN: Final[str] +UNDEFINED_COLUMN: Final[str] +UNDEFINED_OBJECT: Final[str] +DUPLICATE_OBJECT: Final[str] +DUPLICATE_ALIAS: Final[str] +DUPLICATE_FUNCTION: Final[str] +AMBIGUOUS_FUNCTION: Final[str] +GROUPING_ERROR: Final[str] +DATATYPE_MISMATCH: Final[str] +WRONG_OBJECT_TYPE: Final[str] +INVALID_FOREIGN_KEY: Final[str] +CANNOT_COERCE: Final[str] +UNDEFINED_FUNCTION: Final[str] +GENERATED_ALWAYS: Final[str] +RESERVED_NAME: Final[str] +UNDEFINED_TABLE: Final[str] +UNDEFINED_PARAMETER: Final[str] +DUPLICATE_CURSOR: Final[str] +DUPLICATE_DATABASE: Final[str] +DUPLICATE_PREPARED_STATEMENT: Final[str] +DUPLICATE_SCHEMA: Final[str] +DUPLICATE_TABLE: Final[str] +AMBIGUOUS_PARAMETER: Final[str] +AMBIGUOUS_ALIAS: Final[str] +INVALID_COLUMN_REFERENCE: Final[str] +INVALID_CURSOR_DEFINITION: Final[str] +INVALID_DATABASE_DEFINITION: Final[str] +INVALID_FUNCTION_DEFINITION: Final[str] +INVALID_PREPARED_STATEMENT_DEFINITION: Final[str] +INVALID_SCHEMA_DEFINITION: Final[str] +INVALID_TABLE_DEFINITION: Final[str] +INVALID_OBJECT_DEFINITION: Final[str] +INDETERMINATE_DATATYPE: Final[str] +INVALID_RECURSION: Final[str] +WINDOWING_ERROR: Final[str] +COLLATION_MISMATCH: Final[str] +INDETERMINATE_COLLATION: Final[str] +WITH_CHECK_OPTION_VIOLATION: Final[str] +INSUFFICIENT_RESOURCES: Final[str] +DISK_FULL: Final[str] +OUT_OF_MEMORY: Final[str] +TOO_MANY_CONNECTIONS: Final[str] +CONFIGURATION_LIMIT_EXCEEDED: Final[str] +PROGRAM_LIMIT_EXCEEDED: Final[str] +STATEMENT_TOO_COMPLEX: Final[str] +TOO_MANY_COLUMNS: Final[str] +TOO_MANY_ARGUMENTS: Final[str] +OBJECT_NOT_IN_PREREQUISITE_STATE: Final[str] +OBJECT_IN_USE: Final[str] +CANT_CHANGE_RUNTIME_PARAM: Final[str] +LOCK_NOT_AVAILABLE: Final[str] +UNSAFE_NEW_ENUM_VALUE_USAGE: Final[str] +OPERATOR_INTERVENTION: Final[str] +QUERY_CANCELED: Final[str] +ADMIN_SHUTDOWN: Final[str] +CRASH_SHUTDOWN: Final[str] +CANNOT_CONNECT_NOW: Final[str] +DATABASE_DROPPED: Final[str] +SYSTEM_ERROR: Final[str] +IO_ERROR: Final[str] +UNDEFINED_FILE: Final[str] +DUPLICATE_FILE: Final[str] +SNAPSHOT_TOO_OLD: Final[str] +CONFIG_FILE_ERROR: Final[str] +LOCK_FILE_EXISTS: Final[str] +FDW_ERROR: Final[str] +FDW_OUT_OF_MEMORY: Final[str] +FDW_DYNAMIC_PARAMETER_VALUE_NEEDED: Final[str] +FDW_INVALID_DATA_TYPE: Final[str] +FDW_COLUMN_NAME_NOT_FOUND: Final[str] +FDW_INVALID_DATA_TYPE_DESCRIPTORS: Final[str] +FDW_INVALID_COLUMN_NAME: Final[str] +FDW_INVALID_COLUMN_NUMBER: Final[str] +FDW_INVALID_USE_OF_NULL_POINTER: Final[str] +FDW_INVALID_STRING_FORMAT: Final[str] +FDW_INVALID_HANDLE: Final[str] +FDW_INVALID_OPTION_INDEX: Final[str] +FDW_INVALID_OPTION_NAME: Final[str] +FDW_OPTION_NAME_NOT_FOUND: Final[str] +FDW_REPLY_HANDLE: Final[str] +FDW_UNABLE_TO_CREATE_EXECUTION: Final[str] +FDW_UNABLE_TO_CREATE_REPLY: Final[str] +FDW_UNABLE_TO_ESTABLISH_CONNECTION: Final[str] +FDW_NO_SCHEMAS: Final[str] +FDW_SCHEMA_NOT_FOUND: Final[str] +FDW_TABLE_NOT_FOUND: Final[str] +FDW_FUNCTION_SEQUENCE_ERROR: Final[str] +FDW_TOO_MANY_HANDLES: Final[str] +FDW_INCONSISTENT_DESCRIPTOR_INFORMATION: Final[str] +FDW_INVALID_ATTRIBUTE_VALUE: Final[str] +FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH: Final[str] +FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER: Final[str] +PLPGSQL_ERROR: Final[str] +RAISE_EXCEPTION: Final[str] +NO_DATA_FOUND: Final[str] +TOO_MANY_ROWS: Final[str] +ASSERT_FAILURE: Final[str] +INTERNAL_ERROR: Final[str] +DATA_CORRUPTED: Final[str] +INDEX_CORRUPTED: Final[str] +IDLE_SESSION_TIMEOUT: Final[str] +SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE: Final[str] +TRANSACTION_TIMEOUT: Final[str] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errors.pyi b/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errors.pyi index b2ced22301f8..4c48e32c568e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errors.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/psycopg2/psycopg2/errors.pyi @@ -239,6 +239,7 @@ class TooManyJsonArrayElements(DataError): ... class TooManyJsonObjectMembers(DataError): ... class TooManyRows(InternalError): ... class TransactionResolutionUnknown(OperationalError): ... +class TransactionTimeout(InternalError): ... class TriggerProtocolViolated(InternalError): ... class TriggeredDataChangeViolation(OperationalError): ... class TrimError(DataError): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pygit2/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/pygit2/METADATA.toml index 17c37a96d5d4..13eec7dc9537 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pygit2/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/pygit2/METADATA.toml @@ -1,6 +1,7 @@ version = "1.15.*" upstream_repository = "https://github.com/libgit2/pygit2" requires = ["types-cffi"] +obsolete_since = "1.16.0" # Released on 2024-10-11 [tool.stubtest] platforms = ["darwin", "linux", "win32"] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/METADATA.toml index 70aee5df3de8..b3bb0bad8e4b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/METADATA.toml @@ -1,4 +1,4 @@ -version = "306.*" +version = "308.*" upstream_repository = "https://github.com/mhammond/pywin32" [tool.stubtest] diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/_win32typing.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/_win32typing.pyi index c80e822b0d10..3903be7e3be1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/_win32typing.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/_win32typing.pyi @@ -1,7 +1,7 @@ # Not available at runtime. Contains type definitions that are otherwise not exposed and not part of a specific module. from _typeshed import Incomplete, Unused from collections.abc import Iterable, Sequence -from typing import Literal, SupportsIndex, final, overload +from typing import Literal, NoReturn, SupportsIndex, final, overload from typing_extensions import Self, TypeAlias, deprecated from win32.lib.pywintypes import TimeType @@ -3658,6 +3658,23 @@ class PyIFileOperation: def PerformOperations(self) -> None: ... def GetAnyOperationsAborted(self): ... +class PyIFolderView: + def GetCurrentViewMode(self): ... + def SetCurrentViewMode(self, ViewMode: int, /): ... + def GetFolder(self, riid: PyIID | None, /): ... + def Item(self, iItemIndex: int, /): ... + def ItemCount(self, uFlags: int, /): ... + def Items(self) -> NoReturn: ... # Not Implemented + def GetSelectionMarkedItem(self): ... + def GetFocusedItem(self): ... + def GetItemPosition(self, pidl: PyIDL | None, /): ... + def GetSpacing(self, pt_x: int, pt_y: int, /): ... + def GetDefaultSpacing(self): ... + def GetAutoArrange(self): ... + def SelectItem(self, iItem: int, dwFlags: int, /): ... + def SelectAndPositionItems(self) -> NoReturn: ... # Not Implemented + def SelectAndPositionItem(self, apidl: PyIDL | None, pt: tuple[int, int], dwFlags: int, /): ... + class PyIIdentityName: ... class PyIInitializeWithFile: @@ -3911,6 +3928,7 @@ class PyIMsgServiceAdmin: class PyIMsgStore: def OpenEntry(self, entryId: str, iid: PyIID, flags, /): ... + def StoreLogoff(self, flags: int, /): ... def GetReceiveFolder(self, messageClass: str | None = ..., flags: int = ..., /) -> tuple[PyIID, str]: ... def GetReceiveFolderTable(self, flags, /) -> PyIMAPITable: ... def CompareEntryIDs(self, entryId: str, entryId1: str, flags: int = ..., /): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/afxres.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/afxres.pyi deleted file mode 100644 index 0d3239c038ab..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/afxres.pyi +++ /dev/null @@ -1 +0,0 @@ -from win32.lib.afxres import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/simple.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/simple.pyi index 7e9bc1b38b8e..594f30bcd7d1 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/simple.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/simple.pyi @@ -1,12 +1,10 @@ -from _typeshed import Incomplete - class SimpleExtension: def GetExtensionVersion(self, vi) -> None: ... def HttpExtensionProc(self, control_block) -> None: ... def TerminateExtension(self, status) -> None: ... class SimpleFilter: - filter_flags: Incomplete + filter_flags: int | None def GetFilterVersion(self, fv) -> None: ... def HttpFilterProc(self, fc) -> None: ... def TerminateFilter(self, status) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/threaded_extension.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/threaded_extension.pyi index 502351d2ed8d..0a463a6470e5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/threaded_extension.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/isapi/threaded_extension.pyi @@ -2,8 +2,6 @@ import threading from _typeshed import Incomplete import isapi.simple -from isapi import ExtensionError as ExtensionError, isapicon as isapicon -from win32event import INFINITE as INFINITE ISAPI_REQUEST: int ISAPI_SHUTDOWN: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/_wincerapi.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/_wincerapi.pyi deleted file mode 100644 index d5152b9e54cc..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/_wincerapi.pyi +++ /dev/null @@ -1,73 +0,0 @@ -from _typeshed import Incomplete - -import _win32typing - -def CeRapiInit() -> None: ... -def CeRapiUninit() -> None: ... -def CreateProcess( - appName: str | None, - commandLine: str, - processAttributes: _win32typing.PySECURITY_ATTRIBUTES | None, - threadAttributes: _win32typing.PySECURITY_ATTRIBUTES | None, - bInheritHandles: int | bool, - dwCreationFlags: int, - newEnvironment: dict[str, str] | None, - currentDirectory: str | None, - startupinfo: _win32typing.PySTARTUPINFO, - /, -) -> tuple[int, int, Incomplete, Incomplete]: ... -def CeRapiInitEx(): ... -def CeCopyFile(_from: str, to: str, bFailIfExists, /) -> None: ... -def CeCheckPassword(password: str, /) -> None: ... -def CeCreateFile( - fileName: str, - desiredAccess, - shareMode, - attributes: _win32typing.PySECURITY_ATTRIBUTES, - creationDisposition, - flagsAndAttributes, - hTemplateFile: int, - /, -) -> _win32typing.PyCEHANDLE: ... -def CeDeleteFile(fileName: str, /) -> None: ... -def CeMoveFile(existingFileName: str, newFileName: str, /) -> None: ... -def CeCreateDirectory(name: str, sa: _win32typing.PySECURITY_ATTRIBUTES, /) -> None: ... -def CeRemoveDirectory(lpPathName: str, /) -> None: ... -def CeGetTempPath() -> str: ... -def CeGetSystemInfo(): ... -def CeGetDesktopDeviceCaps(): ... -def CeGetSystemMetrics(): ... -def CeGetSpecialFolderPath() -> str: ... -def CeGetStoreInformation() -> tuple[Incomplete, Incomplete]: ... -def CeGetSystemPowerStatusEx(): ... -def CeSHCreateShortcut() -> None: ... -def CeSHGetShortcutTarget(): ... -def CeGetVersionEx() -> tuple[Incomplete, Incomplete, Incomplete, Incomplete, str]: ... -def CeGlobalMemoryStatus(): ... -def FindFiles(fileSpec: str, /): ... -def CeGetFileAttributes(fileName: str, /): ... -def CeSetFileAttributes(filename: str, newAttributes, /) -> None: ... -def CeGetFileSize(): ... -def CeReadFile(hFile: int, bufSize, /) -> str: ... -def WriteFile(hFile: int, data: str | bytes | _win32typing.PyOVERLAPPEDReadBuffer, /) -> tuple[int, int]: ... - -CSIDL_BITBUCKET = ... -CSIDL_COMMON_DESKTOPDIRECTORY = ... -CSIDL_COMMON_PROGRAMS = ... -CSIDL_COMMON_STARTMENU = ... -CSIDL_COMMON_STARTUP = ... -CSIDL_CONTROLS = ... -CSIDL_DESKTOP = ... -CSIDL_DESKTOPDIRECTORY = ... -CSIDL_DRIVES = ... -CSIDL_FONTS = ... -CSIDL_NETHOOD = ... -CSIDL_NETWORK = ... -CSIDL_PERSONAL = ... -CSIDL_PRINTERS = ... -CSIDL_PROGRAMS = ... -CSIDL_RECENT = ... -CSIDL_SENDTO = ... -CSIDL_STARTMENU = ... -CSIDL_STARTUP = ... -CSIDL_TEMPLATES = ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/afxres.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/afxres.pyi deleted file mode 100644 index 58a208695b54..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/afxres.pyi +++ /dev/null @@ -1,499 +0,0 @@ -from _typeshed import Incomplete - -TCS_MULTILINE: int -CBRS_ALIGN_LEFT: int -CBRS_ALIGN_TOP: int -CBRS_ALIGN_RIGHT: int -CBRS_ALIGN_BOTTOM: int -CBRS_ALIGN_ANY: int -CBRS_BORDER_LEFT: int -CBRS_BORDER_TOP: int -CBRS_BORDER_RIGHT: int -CBRS_BORDER_BOTTOM: int -CBRS_BORDER_ANY: int -CBRS_TOOLTIPS: int -CBRS_FLYBY: int -CBRS_FLOAT_MULTI: int -CBRS_BORDER_3D: int -CBRS_HIDE_INPLACE: int -CBRS_SIZE_DYNAMIC: int -CBRS_SIZE_FIXED: int -CBRS_FLOATING: int -CBRS_GRIPPER: int -CBRS_ORIENT_HORZ: Incomplete -CBRS_ORIENT_VERT: Incomplete -CBRS_ORIENT_ANY: Incomplete -CBRS_ALL: int -CBRS_NOALIGN: int -CBRS_LEFT: Incomplete -CBRS_TOP: Incomplete -CBRS_RIGHT: Incomplete -CBRS_BOTTOM: Incomplete -SBPS_NORMAL: int -SBPS_NOBORDERS: int -SBPS_POPOUT: int -SBPS_OWNERDRAW: int -SBPS_DISABLED: int -SBPS_STRETCH: int -ID_INDICATOR_EXT: int -ID_INDICATOR_CAPS: int -ID_INDICATOR_NUM: int -ID_INDICATOR_SCRL: int -ID_INDICATOR_OVR: int -ID_INDICATOR_REC: int -ID_INDICATOR_KANA: int -ID_SEPARATOR: int -AFX_IDW_CONTROLBAR_FIRST: int -AFX_IDW_CONTROLBAR_LAST: int -AFX_IDW_TOOLBAR: int -AFX_IDW_STATUS_BAR: int -AFX_IDW_PREVIEW_BAR: int -AFX_IDW_RESIZE_BAR: int -AFX_IDW_DOCKBAR_TOP: int -AFX_IDW_DOCKBAR_LEFT: int -AFX_IDW_DOCKBAR_RIGHT: int -AFX_IDW_DOCKBAR_BOTTOM: int -AFX_IDW_DOCKBAR_FLOAT: int - -def AFX_CONTROLBAR_MASK(nIDC): ... - -AFX_IDW_PANE_FIRST: int -AFX_IDW_PANE_LAST: int -AFX_IDW_HSCROLL_FIRST: int -AFX_IDW_VSCROLL_FIRST: int -AFX_IDW_SIZE_BOX: int -AFX_IDW_PANE_SAVE: int -AFX_IDS_APP_TITLE: int -AFX_IDS_IDLEMESSAGE: int -AFX_IDS_HELPMODEMESSAGE: int -AFX_IDS_APP_TITLE_EMBEDDING: int -AFX_IDS_COMPANY_NAME: int -AFX_IDS_OBJ_TITLE_INPLACE: int -ID_FILE_NEW: int -ID_FILE_OPEN: int -ID_FILE_CLOSE: int -ID_FILE_SAVE: int -ID_FILE_SAVE_AS: int -ID_FILE_PAGE_SETUP: int -ID_FILE_PRINT_SETUP: int -ID_FILE_PRINT: int -ID_FILE_PRINT_DIRECT: int -ID_FILE_PRINT_PREVIEW: int -ID_FILE_UPDATE: int -ID_FILE_SAVE_COPY_AS: int -ID_FILE_SEND_MAIL: int -ID_FILE_MRU_FIRST: int -ID_FILE_MRU_FILE1: int -ID_FILE_MRU_FILE2: int -ID_FILE_MRU_FILE3: int -ID_FILE_MRU_FILE4: int -ID_FILE_MRU_FILE5: int -ID_FILE_MRU_FILE6: int -ID_FILE_MRU_FILE7: int -ID_FILE_MRU_FILE8: int -ID_FILE_MRU_FILE9: int -ID_FILE_MRU_FILE10: int -ID_FILE_MRU_FILE11: int -ID_FILE_MRU_FILE12: int -ID_FILE_MRU_FILE13: int -ID_FILE_MRU_FILE14: int -ID_FILE_MRU_FILE15: int -ID_FILE_MRU_FILE16: int -ID_FILE_MRU_LAST: int -ID_EDIT_CLEAR: int -ID_EDIT_CLEAR_ALL: int -ID_EDIT_COPY: int -ID_EDIT_CUT: int -ID_EDIT_FIND: int -ID_EDIT_PASTE: int -ID_EDIT_PASTE_LINK: int -ID_EDIT_PASTE_SPECIAL: int -ID_EDIT_REPEAT: int -ID_EDIT_REPLACE: int -ID_EDIT_SELECT_ALL: int -ID_EDIT_UNDO: int -ID_EDIT_REDO: int -ID_WINDOW_NEW: int -ID_WINDOW_ARRANGE: int -ID_WINDOW_CASCADE: int -ID_WINDOW_TILE_HORZ: int -ID_WINDOW_TILE_VERT: int -ID_WINDOW_SPLIT: int -AFX_IDM_WINDOW_FIRST: int -AFX_IDM_WINDOW_LAST: int -AFX_IDM_FIRST_MDICHILD: int -ID_APP_ABOUT: int -ID_APP_EXIT: int -ID_HELP_INDEX: int -ID_HELP_FINDER: int -ID_HELP_USING: int -ID_CONTEXT_HELP: int -ID_HELP: int -ID_DEFAULT_HELP: int -ID_NEXT_PANE: int -ID_PREV_PANE: int -ID_FORMAT_FONT: int -ID_OLE_INSERT_NEW: int -ID_OLE_EDIT_LINKS: int -ID_OLE_EDIT_CONVERT: int -ID_OLE_EDIT_CHANGE_ICON: int -ID_OLE_EDIT_PROPERTIES: int -ID_OLE_VERB_FIRST: int -ID_OLE_VERB_LAST: int -AFX_ID_PREVIEW_CLOSE: int -AFX_ID_PREVIEW_NUMPAGE: int -AFX_ID_PREVIEW_NEXT: int -AFX_ID_PREVIEW_PREV: int -AFX_ID_PREVIEW_PRINT: int -AFX_ID_PREVIEW_ZOOMIN: int -AFX_ID_PREVIEW_ZOOMOUT: int -ID_VIEW_TOOLBAR: int -ID_VIEW_STATUS_BAR: int -ID_RECORD_FIRST: int -ID_RECORD_LAST: int -ID_RECORD_NEXT: int -ID_RECORD_PREV: int -IDC_STATIC: int -AFX_IDS_SCFIRST: int -AFX_IDS_SCSIZE: int -AFX_IDS_SCMOVE: int -AFX_IDS_SCMINIMIZE: int -AFX_IDS_SCMAXIMIZE: int -AFX_IDS_SCNEXTWINDOW: int -AFX_IDS_SCPREVWINDOW: int -AFX_IDS_SCCLOSE: int -AFX_IDS_SCRESTORE: int -AFX_IDS_SCTASKLIST: int -AFX_IDS_MDICHILD: int -AFX_IDS_DESKACCESSORY: int -AFX_IDS_OPENFILE: int -AFX_IDS_SAVEFILE: int -AFX_IDS_ALLFILTER: int -AFX_IDS_UNTITLED: int -AFX_IDS_SAVEFILECOPY: int -AFX_IDS_PREVIEW_CLOSE: int -AFX_IDS_UNNAMED_FILE: int -AFX_IDS_ABOUT: int -AFX_IDS_HIDE: int -AFX_IDP_NO_ERROR_AVAILABLE: int -AFX_IDS_NOT_SUPPORTED_EXCEPTION: int -AFX_IDS_RESOURCE_EXCEPTION: int -AFX_IDS_MEMORY_EXCEPTION: int -AFX_IDS_USER_EXCEPTION: int -AFX_IDS_PRINTONPORT: int -AFX_IDS_ONEPAGE: int -AFX_IDS_TWOPAGE: int -AFX_IDS_PRINTPAGENUM: int -AFX_IDS_PREVIEWPAGEDESC: int -AFX_IDS_PRINTDEFAULTEXT: int -AFX_IDS_PRINTDEFAULT: int -AFX_IDS_PRINTFILTER: int -AFX_IDS_PRINTCAPTION: int -AFX_IDS_PRINTTOFILE: int -AFX_IDS_OBJECT_MENUITEM: int -AFX_IDS_EDIT_VERB: int -AFX_IDS_ACTIVATE_VERB: int -AFX_IDS_CHANGE_LINK: int -AFX_IDS_AUTO: int -AFX_IDS_MANUAL: int -AFX_IDS_FROZEN: int -AFX_IDS_ALL_FILES: int -AFX_IDS_SAVE_MENU: int -AFX_IDS_UPDATE_MENU: int -AFX_IDS_SAVE_AS_MENU: int -AFX_IDS_SAVE_COPY_AS_MENU: int -AFX_IDS_EXIT_MENU: int -AFX_IDS_UPDATING_ITEMS: int -AFX_IDS_METAFILE_FORMAT: int -AFX_IDS_DIB_FORMAT: int -AFX_IDS_BITMAP_FORMAT: int -AFX_IDS_LINKSOURCE_FORMAT: int -AFX_IDS_EMBED_FORMAT: int -AFX_IDS_PASTELINKEDTYPE: int -AFX_IDS_UNKNOWNTYPE: int -AFX_IDS_RTF_FORMAT: int -AFX_IDS_TEXT_FORMAT: int -AFX_IDS_INVALID_CURRENCY: int -AFX_IDS_INVALID_DATETIME: int -AFX_IDS_INVALID_DATETIMESPAN: int -AFX_IDP_INVALID_FILENAME: int -AFX_IDP_FAILED_TO_OPEN_DOC: int -AFX_IDP_FAILED_TO_SAVE_DOC: int -AFX_IDP_ASK_TO_SAVE: int -AFX_IDP_FAILED_TO_CREATE_DOC: int -AFX_IDP_FILE_TOO_LARGE: int -AFX_IDP_FAILED_TO_START_PRINT: int -AFX_IDP_FAILED_TO_LAUNCH_HELP: int -AFX_IDP_INTERNAL_FAILURE: int -AFX_IDP_COMMAND_FAILURE: int -AFX_IDP_FAILED_MEMORY_ALLOC: int -AFX_IDP_PARSE_INT: int -AFX_IDP_PARSE_REAL: int -AFX_IDP_PARSE_INT_RANGE: int -AFX_IDP_PARSE_REAL_RANGE: int -AFX_IDP_PARSE_STRING_SIZE: int -AFX_IDP_PARSE_RADIO_BUTTON: int -AFX_IDP_PARSE_BYTE: int -AFX_IDP_PARSE_UINT: int -AFX_IDP_PARSE_DATETIME: int -AFX_IDP_PARSE_CURRENCY: int -AFX_IDP_FAILED_INVALID_FORMAT: int -AFX_IDP_FAILED_INVALID_PATH: int -AFX_IDP_FAILED_DISK_FULL: int -AFX_IDP_FAILED_ACCESS_READ: int -AFX_IDP_FAILED_ACCESS_WRITE: int -AFX_IDP_FAILED_IO_ERROR_READ: int -AFX_IDP_FAILED_IO_ERROR_WRITE: int -AFX_IDP_STATIC_OBJECT: int -AFX_IDP_FAILED_TO_CONNECT: int -AFX_IDP_SERVER_BUSY: int -AFX_IDP_BAD_VERB: int -AFX_IDP_FAILED_TO_NOTIFY: int -AFX_IDP_FAILED_TO_LAUNCH: int -AFX_IDP_ASK_TO_UPDATE: int -AFX_IDP_FAILED_TO_UPDATE: int -AFX_IDP_FAILED_TO_REGISTER: int -AFX_IDP_FAILED_TO_AUTO_REGISTER: int -AFX_IDP_FAILED_TO_CONVERT: int -AFX_IDP_GET_NOT_SUPPORTED: int -AFX_IDP_SET_NOT_SUPPORTED: int -AFX_IDP_ASK_TO_DISCARD: int -AFX_IDP_FAILED_TO_CREATE: int -AFX_IDP_FAILED_MAPI_LOAD: int -AFX_IDP_INVALID_MAPI_DLL: int -AFX_IDP_FAILED_MAPI_SEND: int -AFX_IDP_FILE_NONE: int -AFX_IDP_FILE_GENERIC: int -AFX_IDP_FILE_NOT_FOUND: int -AFX_IDP_FILE_BAD_PATH: int -AFX_IDP_FILE_TOO_MANY_OPEN: int -AFX_IDP_FILE_ACCESS_DENIED: int -AFX_IDP_FILE_INVALID_FILE: int -AFX_IDP_FILE_REMOVE_CURRENT: int -AFX_IDP_FILE_DIR_FULL: int -AFX_IDP_FILE_BAD_SEEK: int -AFX_IDP_FILE_HARD_IO: int -AFX_IDP_FILE_SHARING: int -AFX_IDP_FILE_LOCKING: int -AFX_IDP_FILE_DISKFULL: int -AFX_IDP_FILE_EOF: int -AFX_IDP_ARCH_NONE: int -AFX_IDP_ARCH_GENERIC: int -AFX_IDP_ARCH_READONLY: int -AFX_IDP_ARCH_ENDOFFILE: int -AFX_IDP_ARCH_WRITEONLY: int -AFX_IDP_ARCH_BADINDEX: int -AFX_IDP_ARCH_BADCLASS: int -AFX_IDP_ARCH_BADSCHEMA: int -AFX_IDS_OCC_SCALEUNITS_PIXELS: int -AFX_IDS_STATUS_FONT: int -AFX_IDS_TOOLTIP_FONT: int -AFX_IDS_UNICODE_FONT: int -AFX_IDS_MINI_FONT: int -AFX_IDP_SQL_FIRST: int -AFX_IDP_SQL_CONNECT_FAIL: int -AFX_IDP_SQL_RECORDSET_FORWARD_ONLY: int -AFX_IDP_SQL_EMPTY_COLUMN_LIST: int -AFX_IDP_SQL_FIELD_SCHEMA_MISMATCH: int -AFX_IDP_SQL_ILLEGAL_MODE: int -AFX_IDP_SQL_MULTIPLE_ROWS_AFFECTED: int -AFX_IDP_SQL_NO_CURRENT_RECORD: int -AFX_IDP_SQL_NO_ROWS_AFFECTED: int -AFX_IDP_SQL_RECORDSET_READONLY: int -AFX_IDP_SQL_SQL_NO_TOTAL: int -AFX_IDP_SQL_ODBC_LOAD_FAILED: int -AFX_IDP_SQL_DYNASET_NOT_SUPPORTED: int -AFX_IDP_SQL_SNAPSHOT_NOT_SUPPORTED: int -AFX_IDP_SQL_API_CONFORMANCE: int -AFX_IDP_SQL_SQL_CONFORMANCE: int -AFX_IDP_SQL_NO_DATA_FOUND: int -AFX_IDP_SQL_ROW_UPDATE_NOT_SUPPORTED: int -AFX_IDP_SQL_ODBC_V2_REQUIRED: int -AFX_IDP_SQL_NO_POSITIONED_UPDATES: int -AFX_IDP_SQL_LOCK_MODE_NOT_SUPPORTED: int -AFX_IDP_SQL_DATA_TRUNCATED: int -AFX_IDP_SQL_ROW_FETCH: int -AFX_IDP_SQL_INCORRECT_ODBC: int -AFX_IDP_SQL_UPDATE_DELETE_FAILED: int -AFX_IDP_SQL_DYNAMIC_CURSOR_NOT_SUPPORTED: int -AFX_IDP_DAO_FIRST: int -AFX_IDP_DAO_ENGINE_INITIALIZATION: int -AFX_IDP_DAO_DFX_BIND: int -AFX_IDP_DAO_OBJECT_NOT_OPEN: int -AFX_IDP_DAO_ROWTOOSHORT: int -AFX_IDP_DAO_BADBINDINFO: int -AFX_IDP_DAO_COLUMNUNAVAILABLE: int -AFX_IDC_LISTBOX: int -AFX_IDC_CHANGE: int -AFX_IDC_PRINT_DOCNAME: int -AFX_IDC_PRINT_PRINTERNAME: int -AFX_IDC_PRINT_PORTNAME: int -AFX_IDC_PRINT_PAGENUM: int -ID_APPLY_NOW: int -ID_WIZBACK: int -ID_WIZNEXT: int -ID_WIZFINISH: int -AFX_IDC_TAB_CONTROL: int -AFX_IDD_FILEOPEN: int -AFX_IDD_FILESAVE: int -AFX_IDD_FONT: int -AFX_IDD_COLOR: int -AFX_IDD_PRINT: int -AFX_IDD_PRINTSETUP: int -AFX_IDD_FIND: int -AFX_IDD_REPLACE: int -AFX_IDD_NEWTYPEDLG: int -AFX_IDD_PRINTDLG: int -AFX_IDD_PREVIEW_TOOLBAR: int -AFX_IDD_PREVIEW_SHORTTOOLBAR: int -AFX_IDD_INSERTOBJECT: int -AFX_IDD_CHANGEICON: int -AFX_IDD_CONVERT: int -AFX_IDD_PASTESPECIAL: int -AFX_IDD_EDITLINKS: int -AFX_IDD_FILEBROWSE: int -AFX_IDD_BUSY: int -AFX_IDD_OBJECTPROPERTIES: int -AFX_IDD_CHANGESOURCE: int -AFX_IDC_CONTEXTHELP: int -AFX_IDC_MAGNIFY: int -AFX_IDC_SMALLARROWS: int -AFX_IDC_HSPLITBAR: int -AFX_IDC_VSPLITBAR: int -AFX_IDC_NODROPCRSR: int -AFX_IDC_TRACKNWSE: int -AFX_IDC_TRACKNESW: int -AFX_IDC_TRACKNS: int -AFX_IDC_TRACKWE: int -AFX_IDC_TRACK4WAY: int -AFX_IDC_MOVE4WAY: int -AFX_IDB_MINIFRAME_MENU: int -AFX_IDB_CHECKLISTBOX_NT: int -AFX_IDB_CHECKLISTBOX_95: int -AFX_IDR_PREVIEW_ACCEL: int -AFX_IDI_STD_MDIFRAME: int -AFX_IDI_STD_FRAME: int -AFX_IDC_FONTPROP: int -AFX_IDC_FONTNAMES: int -AFX_IDC_FONTSTYLES: int -AFX_IDC_FONTSIZES: int -AFX_IDC_STRIKEOUT: int -AFX_IDC_UNDERLINE: int -AFX_IDC_SAMPLEBOX: int -AFX_IDC_COLOR_BLACK: int -AFX_IDC_COLOR_WHITE: int -AFX_IDC_COLOR_RED: int -AFX_IDC_COLOR_GREEN: int -AFX_IDC_COLOR_BLUE: int -AFX_IDC_COLOR_YELLOW: int -AFX_IDC_COLOR_MAGENTA: int -AFX_IDC_COLOR_CYAN: int -AFX_IDC_COLOR_GRAY: int -AFX_IDC_COLOR_LIGHTGRAY: int -AFX_IDC_COLOR_DARKRED: int -AFX_IDC_COLOR_DARKGREEN: int -AFX_IDC_COLOR_DARKBLUE: int -AFX_IDC_COLOR_LIGHTBROWN: int -AFX_IDC_COLOR_DARKMAGENTA: int -AFX_IDC_COLOR_DARKCYAN: int -AFX_IDC_COLORPROP: int -AFX_IDC_SYSTEMCOLORS: int -AFX_IDC_PROPNAME: int -AFX_IDC_PICTURE: int -AFX_IDC_BROWSE: int -AFX_IDC_CLEAR: int -AFX_IDD_PROPPAGE_COLOR: int -AFX_IDD_PROPPAGE_FONT: int -AFX_IDD_PROPPAGE_PICTURE: int -AFX_IDB_TRUETYPE: int -AFX_IDS_PROPPAGE_UNKNOWN: int -AFX_IDS_COLOR_DESKTOP: int -AFX_IDS_COLOR_APPWORKSPACE: int -AFX_IDS_COLOR_WNDBACKGND: int -AFX_IDS_COLOR_WNDTEXT: int -AFX_IDS_COLOR_MENUBAR: int -AFX_IDS_COLOR_MENUTEXT: int -AFX_IDS_COLOR_ACTIVEBAR: int -AFX_IDS_COLOR_INACTIVEBAR: int -AFX_IDS_COLOR_ACTIVETEXT: int -AFX_IDS_COLOR_INACTIVETEXT: int -AFX_IDS_COLOR_ACTIVEBORDER: int -AFX_IDS_COLOR_INACTIVEBORDER: int -AFX_IDS_COLOR_WNDFRAME: int -AFX_IDS_COLOR_SCROLLBARS: int -AFX_IDS_COLOR_BTNFACE: int -AFX_IDS_COLOR_BTNSHADOW: int -AFX_IDS_COLOR_BTNTEXT: int -AFX_IDS_COLOR_BTNHIGHLIGHT: int -AFX_IDS_COLOR_DISABLEDTEXT: int -AFX_IDS_COLOR_HIGHLIGHT: int -AFX_IDS_COLOR_HIGHLIGHTTEXT: int -AFX_IDS_REGULAR: int -AFX_IDS_BOLD: int -AFX_IDS_ITALIC: int -AFX_IDS_BOLDITALIC: int -AFX_IDS_SAMPLETEXT: int -AFX_IDS_DISPLAYSTRING_FONT: int -AFX_IDS_DISPLAYSTRING_COLOR: int -AFX_IDS_DISPLAYSTRING_PICTURE: int -AFX_IDS_PICTUREFILTER: int -AFX_IDS_PICTYPE_UNKNOWN: int -AFX_IDS_PICTYPE_NONE: int -AFX_IDS_PICTYPE_BITMAP: int -AFX_IDS_PICTYPE_METAFILE: int -AFX_IDS_PICTYPE_ICON: int -AFX_IDS_COLOR_PPG: int -AFX_IDS_COLOR_PPG_CAPTION: int -AFX_IDS_FONT_PPG: int -AFX_IDS_FONT_PPG_CAPTION: int -AFX_IDS_PICTURE_PPG: int -AFX_IDS_PICTURE_PPG_CAPTION: int -AFX_IDS_PICTUREBROWSETITLE: int -AFX_IDS_BORDERSTYLE_0: int -AFX_IDS_BORDERSTYLE_1: int -AFX_IDS_VERB_EDIT: int -AFX_IDS_VERB_PROPERTIES: int -AFX_IDP_PICTURECANTOPEN: int -AFX_IDP_PICTURECANTLOAD: int -AFX_IDP_PICTURETOOLARGE: int -AFX_IDP_PICTUREREADFAILED: int -AFX_IDP_E_ILLEGALFUNCTIONCALL: int -AFX_IDP_E_OVERFLOW: int -AFX_IDP_E_OUTOFMEMORY: int -AFX_IDP_E_DIVISIONBYZERO: int -AFX_IDP_E_OUTOFSTRINGSPACE: int -AFX_IDP_E_OUTOFSTACKSPACE: int -AFX_IDP_E_BADFILENAMEORNUMBER: int -AFX_IDP_E_FILENOTFOUND: int -AFX_IDP_E_BADFILEMODE: int -AFX_IDP_E_FILEALREADYOPEN: int -AFX_IDP_E_DEVICEIOERROR: int -AFX_IDP_E_FILEALREADYEXISTS: int -AFX_IDP_E_BADRECORDLENGTH: int -AFX_IDP_E_DISKFULL: int -AFX_IDP_E_BADRECORDNUMBER: int -AFX_IDP_E_BADFILENAME: int -AFX_IDP_E_TOOMANYFILES: int -AFX_IDP_E_DEVICEUNAVAILABLE: int -AFX_IDP_E_PERMISSIONDENIED: int -AFX_IDP_E_DISKNOTREADY: int -AFX_IDP_E_PATHFILEACCESSERROR: int -AFX_IDP_E_PATHNOTFOUND: int -AFX_IDP_E_INVALIDPATTERNSTRING: int -AFX_IDP_E_INVALIDUSEOFNULL: int -AFX_IDP_E_INVALIDFILEFORMAT: int -AFX_IDP_E_INVALIDPROPERTYVALUE: int -AFX_IDP_E_INVALIDPROPERTYARRAYINDEX: int -AFX_IDP_E_SETNOTSUPPORTEDATRUNTIME: int -AFX_IDP_E_SETNOTSUPPORTED: int -AFX_IDP_E_NEEDPROPERTYARRAYINDEX: int -AFX_IDP_E_SETNOTPERMITTED: int -AFX_IDP_E_GETNOTSUPPORTEDATRUNTIME: int -AFX_IDP_E_GETNOTSUPPORTED: int -AFX_IDP_E_PROPERTYNOTFOUND: int -AFX_IDP_E_INVALIDCLIPBOARDFORMAT: int -AFX_IDP_E_INVALIDPICTURE: int -AFX_IDP_E_PRINTERERROR: int -AFX_IDP_E_CANTSAVEFILETOTEMP: int -AFX_IDP_E_SEARCHTEXTNOTFOUND: int -AFX_IDP_E_REPLACEMENTSTOOLONG: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/pywintypes.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/pywintypes.pyi index be2ecba41723..395e911dde8e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/pywintypes.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/pywintypes.pyi @@ -4,7 +4,7 @@ from _typeshed import Incomplete from collections.abc import Sequence from datetime import datetime from typing import ClassVar, Final, NoReturn, SupportsInt, overload -from typing_extensions import Never, TypeAlias, deprecated +from typing_extensions import Never, deprecated import _win32typing @@ -16,8 +16,6 @@ class error(Exception): class com_error(Exception): ... -UnicodeType: TypeAlias = str - class HANDLEType: def __init__(self, *args: Never) -> NoReturn: ... @property @@ -34,7 +32,6 @@ class TimeType(datetime): # aka: PyTime, PyDateTime IIDType = _win32typing.PyIID def DosDateTimeToTime(FatDate: int, FatTime: int, /) -> TimeType: ... -def Unicode() -> str: ... def UnicodeFromRaw(_str: str, /) -> str: ... def IsTextUnicode(_str: str, flags, /) -> tuple[Incomplete, Incomplete]: ... def OVERLAPPED() -> _win32typing.PyOVERLAPPED: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/regutil.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/regutil.pyi index 73aeee49fff1..60a3e80cc6bc 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/regutil.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/regutil.pyi @@ -1,6 +1,5 @@ from _typeshed import Incomplete -error: str CLSIDPyFile: str RegistryIDPyFile: str RegistryIDPycFile: str diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32evtlogutil.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32evtlogutil.pyi index 8ba408fad31a..b5a74189d8c5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32evtlogutil.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32evtlogutil.pyi @@ -2,8 +2,9 @@ from _typeshed import Incomplete from collections.abc import Iterable import _win32typing -from win32.lib.pywintypes import error as error +import win32api +error = win32api.error langid: Incomplete def AddSourceToRegistry( diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32timezone.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32timezone.pyi index 763eee6bec7a..2b604323aa4a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32timezone.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32timezone.pyi @@ -34,9 +34,9 @@ class TimeZoneInfo(datetime.tzinfo): def dst(self, dt): ... def GetDSTStartTime(self, year): ... def GetDSTEndTime(self, year): ... - def __cmp__(self, other): ... - def __eq__(self, other): ... - def __ne__(self, other): ... + def __le__(self, other) -> bool: ... + def __eq__(self, other) -> bool: ... + def __ne__(self, other) -> bool: ... @classmethod def local(cls): ... @classmethod diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32verstamp.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32verstamp.pyi new file mode 100644 index 000000000000..cac01f8475e1 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/win32verstamp.pyi @@ -0,0 +1,21 @@ +from typing import Final + +VS_FFI_SIGNATURE: Final = -17890115 +VS_FFI_STRUCVERSION: Final = 0x00010000 +VS_FFI_FILEFLAGSMASK: Final = 0x0000003F +VOS_NT_WINDOWS32: Final = 0x00040004 +null_byte: Final = b"\0" + +def file_flags(debug): ... +def file_type(is_dll): ... +def VS_FIXEDFILEINFO(maj, min, sub, build, debug: int = 0, is_dll: int = 1): ... +def nullterm(s): ... +def pad32(s, extra: int = 2): ... +def addlen(s): ... +def String(key, value): ... +def StringTable(key, data): ... +def StringFileInfo(data): ... +def Var(key, value): ... +def VarFileInfo(data): ... +def VS_VERSION_INFO(maj, min, sub, build, sdata, vdata, debug: int = 0, is_dll: int = 1): ... +def stamp(pathname, options) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/winnt.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/winnt.pyi index 9c49122df756..f1ec8493ccc6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/winnt.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/lib/winnt.pyi @@ -166,9 +166,6 @@ NLS_VALID_LOCALE_MASK: int def LANGIDFROMLCID(lcid): ... def SORTIDFROMLCID(lcid): ... -def UNREFERENCED_PARAMETER(P): ... -def DBG_UNREFERENCED_PARAMETER(P): ... -def DBG_UNREFERENCED_LOCAL_VARIABLE(V): ... MAXIMUM_WAIT_OBJECTS: int MAXIMUM_SUSPEND_COUNT: int @@ -836,8 +833,8 @@ IMAGE_ARCHIVE_LINKER_MEMBER: str IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR: int IMAGE_ORDINAL_FLAG: int -def IMAGE_SNAP_BY_ORDINAL(Ordina): ... -def IMAGE_ORDINAL(Ordina): ... +def IMAGE_SNAP_BY_ORDINAL(Ordinal): ... +def IMAGE_ORDINAL(Ordinal): ... IMAGE_RESOURCE_NAME_IS_STRING: int IMAGE_RESOURCE_DATA_IS_DIRECTORY: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32api.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32api.pyi index 658a50174835..6856c263c1f2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32api.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32api.pyi @@ -226,7 +226,7 @@ def SetSysColors(Elements, RgbValues, /) -> None: ... def SetLocalTime(SystemTime: TimeType, /) -> None: ... def SetSystemTime(year, month, dayOfWeek, day, hour, minute, second, millseconds, /): ... def SetClassLong(hwnd: int, offset, val, /): ... -@deprecated("This function is obsolete, use `win32api.SetClassLong` instead") +@deprecated("This function is obsolete, use `win32api.SetClassLong` instead.") def SetClassWord(hwnd: int, offset, val, /): ... def SetCursor(hCursor: int, /) -> int: ... def SetEnvironmentVariable(Name, Value, /) -> None: ... @@ -237,17 +237,13 @@ def SetSystemPowerState(Suspend, Force, /) -> None: ... def SetThreadLocale(lcid, /) -> None: ... def SetTimeZoneInformation(tzi, /): ... def SetWindowLong(hwnd: int | None, offset: int, value: float, /) -> int: ... - -# This method is accidentally overwritten in source, can re-introduce once fixed: -# https://github.com/mhammond/pywin32/pull/2199 -# @deprecated("This function is obsolete, use `win32api.SetWindowLong` instead") -# def SetWindowWord(hwnd, offset: int, val: int) -> int: ... +@deprecated("This function is obsolete, use `win32api.SetWindowLong` instead.") +def SetWindowWord(hwnd, offset: int, val: int) -> int: ... def ShellExecute(hwnd: int, op: str, file: str, params: str, _dir: str, bShow, /): ... def ShowCursor(show, /): ... def Sleep(time, bAlterable: int = ..., /): ... def TerminateProcess(handle: int, exitCode: int, /) -> None: ... def ToAsciiEx(vk, scancode, keyboardstate, flags: int = ..., hlayout: Incomplete | None = ..., /): ... -def Unicode() -> str: ... def UpdateResource( handle: int, type: _win32typing.PyResourceId | int, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32cred.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32cred.pyi index a13f2953dbeb..e0b9c52d303d 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32cred.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32cred.pyi @@ -5,6 +5,7 @@ def CredUnmarshalCredential(MarshaledCredential: str) -> tuple[Incomplete, str]: def CredIsMarshaledCredential(MarshaledCredential: str) -> bool: ... def CredEnumerate(Filter: str | None = ..., Flags: int = ...) -> tuple[dict[str, Incomplete], ...]: ... def CredGetTargetInfo(TargetName: str, Flags: int = ...): ... +def CredGetSessionTypes(MaximumPersistCount: int = 7) -> tuple[int, ...]: ... def CredWriteDomainCredentials(TargetInfo, Credential, Flags: int = ...) -> None: ... def CredReadDomainCredentials(TargetInfo, Flags: int = ...) -> tuple[Incomplete, ...]: ... def CredDelete(TargetName: str, Type, Flags: int = ...) -> None: ... @@ -54,6 +55,7 @@ CREDUI_MAX_PASSWORD_LENGTH: int CREDUI_MAX_USERNAME_LENGTH: int CRED_ALLOW_NAME_RESOLUTION: int CRED_CACHE_TARGET_INFORMATION: int +CRED_ENUMERATE_ALL_CREDENTIALS: int CRED_FLAGS_OWF_CRED_BLOB: int CRED_FLAGS_PASSWORD_FOR_CERT: int CRED_FLAGS_PROMPT_NOW: int @@ -78,8 +80,12 @@ CRED_TI_USERNAME_TARGET: int CRED_TI_VALID_FLAGS: int CRED_TI_WORKGROUP_MEMBER: int CRED_TYPE_DOMAIN_CERTIFICATE: int +CRED_TYPE_DOMAIN_EXTENDED: int CRED_TYPE_DOMAIN_PASSWORD: int CRED_TYPE_DOMAIN_VISIBLE_PASSWORD: int CRED_TYPE_GENERIC: int +CRED_TYPE_GENERIC_CERTIFICATE: int +CRED_TYPE_MAXIMUM: int +CRED_TYPE_MAXIMUM_EX: int CertCredential: int UsernameTargetCredential: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32gui.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32gui.pyi index 46c34e8ed359..cd341a68ccc6 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32gui.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32gui.pyi @@ -56,7 +56,13 @@ def DefWindowProc( ) -> int: ... def EnumWindows(callback: Callable[[int, _T], int | None], extra: _T, /) -> None: ... def EnumThreadWindows(dwThreadId, callback: Callable[[int, _T], int | None], extra: _T, /) -> None: ... -def EnumChildWindows(hwnd: int | None, callback: Callable[[int, _T], int | None], extra: _T, /) -> None: ... +def EnumChildWindows( + hwnd: _win32typing.PyHANDLE | int | None, callback: Callable[[int, _T], int | None], extra: _T, / +) -> None: ... +def EnumDesktopWindows( + hDesktop: _win32typing.PyHANDLE | int | None, callback: Callable[[int, _T], int | None], extra: _T, / +) -> None: ... +def GetThreadDesktop(ThreadId: int, /) -> int: ... def DialogBox(hInstance: int, TemplateName: _win32typing.PyResourceId, hWndParent: int, DialogFunc, InitParam: int = ..., /): ... def DialogBoxParam(): ... def DialogBoxIndirect( @@ -358,6 +364,9 @@ def WindowFromDC(hDC: int, /) -> int: ... def GetUpdateRgn(hWnd: int, hRgn: _win32typing.PyGdiHANDLE, Erase, /): ... def GetWindowRgn(hWnd: int, hRgn: _win32typing.PyGdiHANDLE, /): ... def SetWindowRgn(hWnd: int, hRgn: _win32typing.PyGdiHANDLE | None, Redraw: bool, /) -> None: ... + +# Actually returns a list, but the length is always fixed +def GetWindowRgnBox(hWnd: _win32typing.PyHANDLE | int | None) -> tuple[int, tuple[int, int, int, int]]: ... def ValidateRgn(hWnd: int, hRgn: _win32typing.PyGdiHANDLE, /) -> None: ... def InvalidateRgn(hWnd: int, hRgn: _win32typing.PyGdiHANDLE, Erase, /) -> None: ... def GetRgnBox(hrgn: _win32typing.PyGdiHANDLE, /) -> tuple[Incomplete, _win32typing.PyRECT]: ... @@ -405,7 +414,8 @@ def ScrollWindowEx( ) -> tuple[Incomplete, _win32typing.PyRECT]: ... def SetScrollInfo(hwnd: int, nBar, scollInfo: _win32typing.PySCROLLINFO, bRedraw=..., /) -> None: ... def GetScrollInfo(hwnd: int, nBar, mask, /) -> _win32typing.PySCROLLINFO: ... -def GetClassName(hwnd: int, /) -> str: ... +def GetClassName(hwnd: _win32typing.PyHANDLE | int | None, /) -> str | None: ... +def RealGetWindowClass(hwnd: _win32typing.PyHANDLE | int | None, /) -> str | None: ... def WindowFromPoint(point: tuple[int, int], /) -> int: ... def ChildWindowFromPoint(hwndParent: int, point: tuple[Incomplete, Incomplete], /): ... def CreateDC(Driver: str, Device: str, InitData: _win32typing.PyDEVMODE, /): ... @@ -459,7 +469,8 @@ def DrawTextW(hDC: int, String: str, Count, Rect: _win32typing.PyRECT, Format) - def EnumPropsEx(hWnd: int, EnumFunc, Param, /) -> None: ... def RegisterDeviceNotification(handle: int, _filter, flags, /) -> _win32typing.PyHDEVNOTIFY: ... def UnregisterDeviceNotification() -> None: ... -def RegisterHotKey(hWnd: int, _id, Modifiers, vk, /) -> None: ... +def RegisterHotKey(hWnd: _win32typing.PyHANDLE | int | None, _id: int, Modifiers: int, vk: int, /) -> None: ... +def UnregisterHotKey(hWnd: _win32typing.PyHANDLE | int | None, _id: int, /) -> None: ... def GetAncestor(hwnd: int, gaFlags: int, /) -> int: ... def GetTopWindow(hWnd: int | None, /) -> int: ... def ChildWindowFromPointEx(*args): ... # incomplete diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32service.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32service.pyi index e066194ea49d..30797ebefee5 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32service.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/win32service.pyi @@ -4,7 +4,7 @@ from collections.abc import Iterable import _win32typing from win32.lib.pywintypes import error as error -def GetThreadDesktop(ThreadId, /) -> _win32typing.PyHDESK: ... +def GetThreadDesktop(ThreadId: int, /) -> _win32typing.PyHDESK: ... def EnumWindowStations() -> tuple[tuple[str, Incomplete], ...]: ... def GetUserObjectInformation(Handle: int, _type, /) -> None: ... def SetUserObjectInformation(Handle: int, info, _type, /) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/winxpgui.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/winxpgui.pyi index 631ec869e64c..156611576b85 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/winxpgui.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32/winxpgui.pyi @@ -1,6 +1,5 @@ -from win32.win32gui import * +# The `winxpgui` module is obsolete and has been completely replaced +# by `win32gui` and `win32console.GetConsoleWindow`. Use those instead. -def GetConsoleWindow() -> int: ... - -# Actually returns a list of int|tuple, but lists don't support positional types -def GetWindowRgnBox(hWnd: int, /) -> tuple[int, tuple[int, int, int, int]]: ... +from win32console import GetConsoleWindow as GetConsoleWindow +from win32gui import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/debug.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/debug.pyi new file mode 100644 index 000000000000..a39e0e145b4b --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/debug.pyi @@ -0,0 +1 @@ +from win32comext.axscript.client.debug import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/framework.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/framework.pyi new file mode 100644 index 000000000000..cec9c9a8aaf8 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/client/framework.pyi @@ -0,0 +1 @@ +from win32comext.axscript.client.framework import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/server/error.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/server/error.pyi deleted file mode 100644 index 6de1e5dd26a1..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/axscript/server/error.pyi +++ /dev/null @@ -1 +0,0 @@ -from win32comext.axscript.server.error import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/__init__.pyi index fc2753db68f0..4b43a733bf42 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/__init__.pyi @@ -3,7 +3,7 @@ from typing import Final from typing_extensions import TypeAlias import _win32typing -from win32com.client import dynamic as dynamic, gencache as gencache +from win32com.client import dynamic _Stringifiable: TypeAlias = object @@ -15,7 +15,6 @@ def Dispatch( userName: str | None = ..., resultCLSID: _Stringifiable | None = ..., typeinfo: _win32typing.PyITypeInfo | None = ..., - UnicodeToString: None = None, clsctx: int = ..., ) -> dynamic.CDispatch: ... def DispatchEx( @@ -24,7 +23,6 @@ def DispatchEx( userName: Incomplete | None = ..., resultCLSID: Incomplete | None = ..., typeinfo: Incomplete | None = ..., - UnicodeToString: None = None, clsctx: Incomplete | None = ..., ): ... @@ -67,7 +65,7 @@ class CoClassBaseClass: def __maybe__int__(self, *args): ... def __maybe__iter__(self): ... def __maybe__len__(self): ... - def __maybe__nonzero__(self): ... + def __maybe__bool__(self): ... class VARIANT: varianttype: Incomplete diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/dynamic.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/dynamic.pyi index 041de32eb44e..17b3cb620fff 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/dynamic.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/client/dynamic.pyi @@ -4,7 +4,7 @@ from typing_extensions import TypeAlias import _win32typing from win32.lib.pywintypes import IIDType -from win32com.client import build as build +from win32com.client import build _T_co = TypeVar("_T_co", covariant=True) _T = TypeVar("_T") @@ -15,7 +15,6 @@ class _DispatchCreateClass(Protocol[_T_co]): IDispatch: str | PyIDispatchType | _GoodDispatchTypes | PyIUnknownType, olerepr: build.DispatchItem | build.LazyDispatchItem, userName: str | None = ..., - UnicodeToString: None = None, lazydata: Incomplete | None = ..., ) -> _T_co: ... @@ -27,7 +26,6 @@ ALL_INVOKE_TYPES: Incomplete def debug_print(*args) -> None: ... def debug_attr_print(*args) -> None: ... -def MakeMethod(func, inst, cls): ... PyIDispatchType = _win32typing.PyIDispatch PyIUnknownType = _win32typing.PyIUnknown @@ -40,7 +38,6 @@ def Dispatch( userName: str | None, createClass: _DispatchCreateClass[_T], typeinfo: _win32typing.PyITypeInfo | None = ..., - UnicodeToString: None = None, clsctx: int = ..., ) -> _T: ... @overload @@ -49,23 +46,13 @@ def Dispatch( userName: str | None = ..., createClass: None = None, typeinfo: _win32typing.PyITypeInfo | None = ..., - UnicodeToString: None = None, clsctx: int = ..., ) -> CDispatch: ... def MakeOleRepr(IDispatch, typeinfo, typecomp): ... -def DumbDispatch( - IDispatch, userName: Incomplete | None = ..., createClass: Incomplete | None = ..., UnicodeToString: None = ..., clsctx=... -): ... +def DumbDispatch(IDispatch, userName: Incomplete | None = ..., createClass: Incomplete | None = ..., clsctx=...): ... class CDispatch: - def __init__( - self, - IDispatch, - olerepr, - userName: Incomplete | None = ..., - UnicodeToString: None = None, - lazydata: Incomplete | None = ..., - ) -> None: ... + def __init__(self, IDispatch, olerepr, userName: Incomplete | None = ..., lazydata: Incomplete | None = ...) -> None: ... def __call__(self, *args): ... def __bool__(self) -> bool: ... def __dir__(self): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/mapi/_exchdapi.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/mapi/_exchdapi.pyi deleted file mode 100644 index fe5f8ed0fcdc..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/mapi/_exchdapi.pyi +++ /dev/null @@ -1 +0,0 @@ -from win32comext.mapi._exchdapi import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/connect.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/connect.pyi index cf8670a6d6d8..4c8a1878546e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/connect.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/connect.pyi @@ -1,8 +1,5 @@ from _typeshed import Incomplete -from win32com import olectl as olectl -from win32com.server.exception import Exception as Exception - IConnectionPointContainer_methods: Incomplete IConnectionPoint_methods: Incomplete diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/dispatcher.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/dispatcher.pyi index 6ed1e3410fab..2644262edd5c 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/dispatcher.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/dispatcher.pyi @@ -1,12 +1,11 @@ -from _typeshed import Incomplete -from typing_extensions import TypeAlias, deprecated +from logging import Logger +from typing_extensions import TypeAlias -from win32com.server.exception import IsCOMServerException as IsCOMServerException -from win32com.util import IIDToInterfaceName as IIDToInterfaceName +from win32com.server.policy import BasicWrapPolicy class DispatcherBase: - policy: Incomplete - logger: Incomplete + policy: BasicWrapPolicy + logger: Logger def __init__(self, policyClass, object) -> None: ... class DispatcherTrace(DispatcherBase): ... @@ -16,13 +15,4 @@ class DispatcherWin32trace(DispatcherTrace): class DispatcherOutputDebugString(DispatcherTrace): ... -@deprecated( - """\ -The DispatcherWin32dbg dispatcher is deprecated! -Please let the developer know if this is a problem. -Uncomment the relevant lines in dispatcher.py to re-enable""" -) -class DispatcherWin32dbg(DispatcherBase): - def __init__(self, policyClass, ob) -> None: ... - DefaultDebugDispatcher: TypeAlias = DispatcherTrace diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/exception.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/exception.pyi index 6d27f70942fd..39e793a336ed 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/exception.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/exception.pyi @@ -19,7 +19,5 @@ class COMException(pythoncom.com_error): hresult: Incomplete | None = ..., ) -> None: ... -Exception = COMException - def IsCOMException(t: Incomplete | None = ...): ... def IsCOMServerException(t: Incomplete | None = ...): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/policy.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/policy.pyi index 801047eac863..a6c079adc896 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/policy.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/policy.pyi @@ -1,19 +1,9 @@ from _typeshed import Incomplete from abc import ABC, abstractmethod -from pythoncom import ( - DISPID_COLLECT as DISPID_COLLECT, - DISPID_CONSTRUCTOR as DISPID_CONSTRUCTOR, - DISPID_DESTRUCTOR as DISPID_DESTRUCTOR, - DISPID_UNKNOWN as DISPID_UNKNOWN, -) -from win32com.server.dispatcher import DispatcherTrace as DispatcherTrace, DispatcherWin32trace as DispatcherWin32trace -from win32com.server.exception import COMException as COMException - S_OK: int IDispatchType: Incomplete IUnknownType: Incomplete -error: str regSpec: str regPolicy: str regDispatcher: str diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/util.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/util.pyi index 7e5001429cb1..eb1051f81dc7 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/util.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/server/util.pyi @@ -1,8 +1,6 @@ from _typeshed import Incomplete import _win32typing -from win32com.server import policy as policy -from win32com.server.exception import COMException as COMException def wrap(ob, iid: Incomplete | None = ..., usePolicy: Incomplete | None = ..., useDispatcher: Incomplete | None = ...): ... def unwrap(ob): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/universal.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/universal.pyi index 29452a20d579..fe0e626fc0d3 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/universal.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32com/universal.pyi @@ -2,8 +2,9 @@ from _typeshed import Incomplete from collections.abc import Callable from typing_extensions import TypeAlias -from pythoncom import com_error as com_error -from win32com.client import gencache as gencache +import pythoncom + +com_error = pythoncom.com_error # Type of pythoncom._univgw.WriteFromOutTuple # The two tuples must be of equal length diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/adsi/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/adsi/__init__.pyi index 8a3afe5f54e1..e409f094ef98 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/adsi/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/adsi/__init__.pyi @@ -2,6 +2,9 @@ from _typeshed import Incomplete import _win32typing import win32com.client + +# Re-export everything from win32comext/adsi/adsi.pyd +# Not using a star export because the redefinitions below mess up mypy, pyright and stubtest from win32comext.adsi.adsi import ( DBPROPSET_ADSISEARCH as DBPROPSET_ADSISEARCH, ADsBuildEnumerator as ADsBuildEnumerator, @@ -50,6 +53,7 @@ from win32comext.adsi.adsi import ( IID_IDsObjectPicker as IID_IDsObjectPicker, LIBID_ADs as LIBID_ADs, StringAsDS_SELECTION_LIST as StringAsDS_SELECTION_LIST, + error as error, ) LCID: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/adb.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/adb.pyi index 3a1a293c9c39..ec29264a8ed9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/adb.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/adb.pyi @@ -1,9 +1,8 @@ import bdb from _typeshed import Incomplete -from win32com.axdebug.util import trace -from win32com.server.util import unwrap as unwrap -from win32comext.axdebug import gateways as gateways +from win32comext.axdebug import gateways +from win32comext.axdebug.util import trace def fnull(*args) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/codecontainer.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/codecontainer.pyi index 32647ae273cb..62bc0606ab19 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/codecontainer.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/codecontainer.pyi @@ -1,8 +1,5 @@ from _typeshed import Incomplete -from win32comext.axdebug import contexts as contexts -from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl - name: str class SourceCodeContainer: @@ -13,7 +10,7 @@ class SourceCodeContainer: codeContexts: Incomplete site: Incomplete startLineNumber: Incomplete - debugDocument: Incomplete + debugDocument: Incomplete | None def __init__( self, text, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/contexts.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/contexts.pyi index 4561b453c89e..f3d9528f774e 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/contexts.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/contexts.pyi @@ -1,7 +1,6 @@ from _typeshed import Incomplete -from win32comext.axdebug import adb as adb, gateways -from win32comext.axdebug.util import trace as trace +from win32comext.axdebug import gateways class DebugCodeContext(gateways.DebugCodeContext, gateways.DebugDocumentContext): debugSite: Incomplete diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/debugger.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/debugger.pyi index f8d294be9a77..851ce60c20b2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/debugger.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/debugger.pyi @@ -1,8 +1,6 @@ from _typeshed import Incomplete -from win32com.axdebug import contexts as contexts, documents, gateways as gateways -from win32com.axdebug.util import trace as trace -from win32com.axscript import axscript as axscript +from win32comext.axdebug import documents currentDebugger: Incomplete diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/documents.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/documents.pyi index 5be676213228..33b767822ea8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/documents.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/documents.pyi @@ -1,8 +1,6 @@ from _typeshed import Incomplete -from win32com.server.exception import Exception as Exception -from win32comext.axdebug import codecontainer as codecontainer, contexts as contexts, gateways -from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl, trace as trace +from win32comext.axdebug import gateways def GetGoodFileName(fname): ... @@ -13,9 +11,7 @@ class DebugDocumentProvider(gateways.DebugDocumentProvider): def GetDocumentClassId(self): ... def GetDocument(self): ... -# error: Cannot determine consistent method resolution order (MRO) for "DebugDocumentText" -# pyright doesn't have a specific error code for MRO error! -class DebugDocumentText(gateways.DebugDocumentInfo, gateways.DebugDocumentText, gateways.DebugDocument): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] +class DebugDocumentText(gateways.DebugDocumentText): codeContainer: Incomplete def __init__(self, codeContainer) -> None: ... def GetName(self, dnt): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/expressions.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/expressions.pyi index fac92805ba4e..2406702c2fbd 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/expressions.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/expressions.pyi @@ -1,9 +1,7 @@ from _typeshed import Incomplete -from win32com.server.exception import COMException as COMException from win32com.server.util import ListEnumeratorGateway from win32comext.axdebug import gateways -from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl def MakeNiceString(ob): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/stackframe.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/stackframe.pyi index 931a1013b59c..6c12e6d28d82 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/stackframe.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/stackframe.pyi @@ -1,8 +1,6 @@ from _typeshed import Incomplete -from win32com.server.exception import COMException as COMException from win32comext.axdebug import gateways -from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl, trace as trace class EnumDebugStackFrames(gateways.EnumDebugStackFrames): def __init__(self, debugger) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/util.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/util.pyi index 5ec04b350504..82b53ac6c07b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/util.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axdebug/util.pyi @@ -1,14 +1,11 @@ from _typeshed import Incomplete -import win32com.server.policy +import win32com.server.dispatcher debugging: int def trace(*args) -> None: ... - -all_wrapped: Incomplete - def RaiseNotImpl(who: Incomplete | None = ...) -> None: ... -class Dispatcher(win32com.server.policy.DispatcherWin32trace): +class Dispatcher(win32com.server.dispatcher.DispatcherWin32trace): def __init__(self, policyClass, object) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/debug.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/debug.pyi new file mode 100644 index 000000000000..8c1752564df6 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/debug.pyi @@ -0,0 +1,42 @@ +from _typeshed import Incomplete + +from win32comext.axdebug import gateways +from win32comext.axdebug.codecontainer import SourceCodeContainer + +debuggingTrace: int + +def trace(*args) -> None: ... + +class DebugManager: + scriptEngine: Incomplete + adb: Incomplete + rootNode: Incomplete + debugApplication: Incomplete + ccProvider: Incomplete + scriptSiteDebug: Incomplete + activeScriptDebug: Incomplete + codeContainers: Incomplete + def __init__(self, scriptEngine) -> None: ... + def Close(self) -> None: ... + def IsAnyHost(self): ... + def IsSimpleHost(self): ... + def HandleRuntimeError(self): ... + def OnEnterScript(self) -> None: ... + def OnLeaveScript(self) -> None: ... + def AddScriptBlock(self, codeBlock) -> None: ... + +class DebugCodeBlockContainer(SourceCodeContainer): + codeBlock: Incomplete + def __init__(self, codeBlock, site) -> None: ... + def GetName(self, dnt): ... + +class EnumDebugCodeContexts(gateways.EnumDebugCodeContexts): ... + +class ActiveScriptDebug: + debugMgr: Incomplete + scriptSiteDebug: Incomplete + codeContainers: Incomplete + def __init__(self, debugMgr, codeContainers) -> None: ... + def GetScriptTextAttributes(self, code, delim, flags): ... + def GetScriptletTextAttributes(self, code, delim, flags): ... + def EnumCodeContextsOfPosition(self, context, charOffset, numChars): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/error.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/error.pyi index 24ce7a5219bf..40d95a89c137 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/error.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/error.pyi @@ -1,21 +1,35 @@ +from types import TracebackType + from win32com.server.exception import COMException +from win32comext.axscript.client.debug import DebugManager +from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript +from win32comext.axscript.server.axsite import AXSite debugging: int -def FormatForAX(text): ... -def ExpandTabs(text): ... -def AddCR(text): ... +def FormatForAX(text: str) -> str: ... +def ExpandTabs(text: str) -> str: ... +def AddCR(text: str) -> str: ... class IActiveScriptError: - def GetSourceLineText(self): ... - def GetSourcePosition(self): ... - def GetExceptionInfo(self): ... + def GetSourceLineText(self) -> str | None: ... + def GetSourcePosition(self) -> tuple[int, int, int]: ... + def GetExceptionInfo(self) -> AXScriptException: ... class AXScriptException(COMException): sourceContext: int startLineNo: int linetext: str - def __init__(self, site, codeBlock, exc_type, exc_value, exc_traceback) -> None: ... - def ExtractTracebackInfo(self, tb, site): ... + def __init__( + self, + site: COMScript, + codeBlock: AXScriptCodeBlock | None, + exc_type: None = None, + exc_value: BaseException | None = None, + exc_traceback: None = None, + ) -> None: ... + def ExtractTracebackInfo(self, tb: TracebackType, site: COMScript) -> tuple[str, int, str, str | None]: ... -def ProcessAXScriptException(scriptingSite, debugManager, exceptionInstance): ... +def ProcessAXScriptException( + scriptingSite: AXSite, debugManager: DebugManager, exceptionInstance: AXScriptException +) -> None | COMException | AXScriptException: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/framework.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/framework.pyi new file mode 100644 index 000000000000..5a2dd0745612 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/framework.pyi @@ -0,0 +1,154 @@ +from _typeshed import Incomplete +from typing import NoReturn + +def RemoveCR(text): ... + +SCRIPTTEXT_FORCEEXECUTION: int +SCRIPTTEXT_ISEXPRESSION: int +SCRIPTTEXT_ISPERSISTENT: int +state_map: Incomplete + +def profile(fn, *args): ... + +class SafeOutput: + softspace: int + redir: Incomplete + def __init__(self, redir: Incomplete | None = None) -> None: ... + def write(self, message) -> None: ... + def flush(self) -> None: ... + def close(self) -> None: ... + +def MakeValidSysOuts() -> None: ... +def trace(*args) -> None: ... +def RaiseAssert(scode, desc) -> NoReturn: ... + +class AXScriptCodeBlock: + name: Incomplete + codeText: Incomplete + codeObject: Incomplete + sourceContextCookie: Incomplete + startLineNumber: Incomplete + flags: Incomplete + beenExecuted: int + def __init__(self, name: str, codeText: str, sourceContextCookie: int, startLineNumber: int, flags) -> None: ... + def GetFileName(self): ... + def GetDisplayName(self): ... + def GetLineNo(self, no: int): ... + +class Event: + name: str + def __init__(self) -> None: ... + def Reset(self) -> None: ... + def Close(self) -> None: ... + dispid: Incomplete + def Build(self, typeinfo, funcdesc) -> None: ... + +class EventSink: + events: Incomplete + connection: Incomplete + coDispatch: Incomplete + myScriptItem: Incomplete + myInvokeMethod: Incomplete + iid: Incomplete + def __init__(self, myItem, coDispatch) -> None: ... + def Reset(self) -> None: ... + def Close(self) -> None: ... + def GetSourceTypeInfo(self, typeinfo): ... + def BuildEvents(self) -> None: ... + def Connect(self) -> None: ... + def Disconnect(self) -> None: ... + +class ScriptItem: + parentItem: Incomplete + dispatch: Incomplete + name: Incomplete + flags: Incomplete + eventSink: Incomplete + subItems: Incomplete + createdConnections: int + isRegistered: int + def __init__(self, parentItem, name, dispatch, flags) -> None: ... + def Reset(self) -> None: ... + def Close(self) -> None: ... + def Register(self) -> None: ... + def IsGlobal(self): ... + def IsVisible(self): ... + def GetEngine(self): ... + def GetSubItemClass(self): ... + def GetSubItem(self, name): ... + def GetCreateSubItem(self, parentItem, name, dispatch, flags): ... + def CreateConnections(self) -> None: ... + def Connect(self) -> None: ... + def Disconnect(self) -> None: ... + def BuildEvents(self) -> None: ... + def FindBuildSubItemEvents(self) -> None: ... + def GetDefaultSourceTypeInfo(self, typeinfo): ... + +IActiveScriptMethods: Incomplete +IActiveScriptParseMethods: Incomplete +IObjectSafetyMethods: Incomplete +IActiveScriptParseProcedureMethods: Incomplete + +class COMScript: + baseThreadId: int + debugManager: Incomplete + threadState: Incomplete + scriptState: Incomplete + scriptSite: Incomplete + safetyOptions: int + lcid: int + subItems: Incomplete + scriptCodeBlocks: Incomplete + def __init__(self) -> None: ... + def InitNew(self) -> None: ... + def AddScriptlet( + self, defaultName, code, itemName, subItemName, eventName, delimiter, sourceContextCookie, startLineNumber + ) -> None: ... + def ParseScriptText(self, code, itemName, context, delimiter, sourceContextCookie, startLineNumber, flags, bWantResult): ... + def ParseProcedureText( + self, code, formalParams, procName, itemName, unkContext, delimiter, contextCookie, startingLineNumber, flags + ) -> None: ... + def SetScriptSite(self, site) -> None: ... + def GetScriptSite(self, iid): ... + def SetScriptState(self, state) -> None: ... + def GetScriptState(self): ... + persistLoaded: int + def Close(self) -> None: ... + def AddNamedItem(self, name, flags) -> None: ... + def GetScriptDispatch(self, name) -> None: ... + def GetCurrentScriptThreadID(self): ... + def GetScriptThreadID(self, win32ThreadId): ... + def GetScriptThreadState(self, scriptThreadId): ... + def AddTypeLib(self, uuid, major, minor, flags) -> None: ... + def Clone(self) -> None: ... + def SetInterfaceSafetyOptions(self, iid, optionsMask, enabledOptions) -> None: ... + def GetInterfaceSafetyOptions(self, iid): ... + def ExecutePendingScripts(self) -> None: ... + def ProcessScriptItemEvent(self, item, event, lcid, wFlags, args): ... + def ResetNamedItems(self) -> None: ... + def GetCurrentSafetyOptions(self): ... + def ProcessNewNamedItemsConnections(self) -> None: ... + def RegisterNewNamedItems(self) -> None: ... + def RegisterNamedItem(self, item) -> None: ... + def CheckConnectedOrDisconnected(self) -> None: ... + def Connect(self) -> None: ... + def Run(self) -> None: ... + def Stop(self) -> None: ... + def Disconnect(self) -> None: ... + def ConnectEventHandlers(self) -> None: ... + def DisconnectEventHandlers(self) -> None: ... + def Reset(self) -> None: ... + def ChangeScriptState(self, state) -> None: ... + def ApplyInScriptedSection(self, codeBlock: AXScriptCodeBlock | None, fn, args): ... + def CompileInScriptedSection(self, codeBlock: AXScriptCodeBlock, type, realCode: Incomplete | None = None): ... + def ExecInScriptedSection(self, codeBlock: AXScriptCodeBlock, globals, locals: Incomplete | None = None): ... + def EvalInScriptedSection(self, codeBlock, globals, locals: Incomplete | None = None): ... + def HandleException(self, codeBlock: AXScriptCodeBlock | None) -> NoReturn: ... + def BeginScriptedSection(self) -> None: ... + def EndScriptedSection(self) -> None: ... + def DisableInterrupts(self) -> None: ... + def EnableInterrupts(self) -> None: ... + def GetNamedItem(self, name): ... + def GetNamedItemClass(self): ... + +def dumptypeinfo(typeinfo) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/pyscript.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/pyscript.pyi deleted file mode 100644 index 548e95fe2e5c..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/client/pyscript.pyi +++ /dev/null @@ -1,3 +0,0 @@ -# Necessary for mypy to not fail with: -# 'error: Cannot find implementation or library stub for module named "win32comext.axscript.client.pyscript"' -# in: .gateways, .stackframe, .expressions, .adb, .contexts, .codecontainer, .documents, .debugger diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/server/error.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/server/error.pyi deleted file mode 100644 index deb38c3cfde2..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/axscript/server/error.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from _typeshed import Incomplete - -class Exception: - activeScriptError: Incomplete - def __init__(self, activeScriptError) -> None: ... - def __getattr__(self, attr: str): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/_exchdapi.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/_exchdapi.pyi deleted file mode 100644 index a0e9d1e446c5..000000000000 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/_exchdapi.pyi +++ /dev/null @@ -1,43 +0,0 @@ -from _typeshed import Incomplete - -import _win32typing - -def HrInstallService() -> None: ... -def HrInstallMailboxAgent() -> None: ... -def HrCreateMailboxAgentProfile(serviceName: str, profile: str, /) -> None: ... -def HrCreateGatewayProfile(serviceName: str, profile: str, /) -> None: ... -def HrMailboxAgentExists(server: str, siteDN: str, rdn: str, /) -> None: ... -def HrAdminProgramExists() -> None: ... -def HrRemoveMailboxAgent(server: str, siteDN: str, rdn: str, /) -> None: ... -def HrRemoveProfile(profile: str, /) -> None: ... -def HrEnumOrganizations(rootDN: str, server: str, /) -> list[str]: ... -def HrEnumSites(server: str, organizationDN: str, /) -> list[str]: ... -def HrEnumContainers(server: str, siteDN: str, fSubtree, /) -> list[str]: ... -def HrEnumSiteAdmins(server: str, siteDN: str, /) -> list[str]: ... -def HrGetServiceAccountName(serviceName: str, serviceName1: str, /) -> str: ... -def HrCreateDirEntryIdEx(addrBook: _win32typing.PyIAddrBook, distinguishedName: str, /) -> str: ... -def HrCreateProfileName(profPrefix: str, /) -> str: ... -def HrFindExchangeGlobalAddresslist(addrBook: _win32typing.PyIAddrBook, /) -> str: ... -def HrGetExchangeStatus(server: str, /) -> tuple[Incomplete, Incomplete]: ... -def HrGetMailboxDN(session, /) -> str: ... -def HrGetServerDN(session, /) -> str: ... -def HrMAPIFindDefaultMsgStore(session: _win32typing.PyIMAPISession, /) -> str: ... -def HrMAPIFindFolder(folder: _win32typing.PyIMAPIFolder, name: str, /) -> str: ... -def HrMAPIFindFolderEx(msgStore: _win32typing.PyIMsgStore, sepString: str, path: str, /) -> str: ... -def HrMAPIFindIPMSubtree(msgStore: _win32typing.PyIMsgStore, /) -> str: ... -def HrMAPIFindInbox(msgStore: _win32typing.PyIMsgStore, /) -> str: ... -def HrMAPIFindStore(session: _win32typing.PyIMAPISession, name: str, /) -> _win32typing.PyIMsgStore: ... -def HrMAPIFindSubfolderEx(rootFolder: _win32typing.PyIMAPIFolder, sep: str, name: str, /) -> _win32typing.PyIMsgStore: ... -def HrMAPIOpenFolderEx(msgStore: _win32typing.PyIMsgStore, sep: str, name: str, /) -> _win32typing.PyIMAPIFolder: ... -def HrMAPISetPropBoolean(obj: _win32typing.PyIMAPIProp, tag, /) -> None: ... -def HrMAPISetPropLong(obj: _win32typing.PyIMAPIProp, tag, /) -> None: ... -def HrMailboxLogoff(inbox: _win32typing.PyIMsgStore, /) -> None: ... -def HrMailboxLogon( - session: _win32typing.PyIMAPISession, msgStore: _win32typing.PyIMsgStore, msgStoreDN: str, mailboxDN: str, / -) -> _win32typing.PyIMsgStore: ... -def HrOpenExchangePrivateStore(session: _win32typing.PyIMAPISession, /) -> _win32typing.PyIMsgStore: ... -def HrOpenExchangePublicFolders(store: _win32typing.PyIMsgStore, /) -> _win32typing.PyIMAPIFolder: ... -def HrOpenExchangePublicStore(session: _win32typing.PyIMAPISession, /) -> _win32typing.PyIMsgStore: ... -def HrOpenSessionObject(session: _win32typing.PyIMAPISession, /) -> _win32typing.PyIMAPIProp: ... -def HrOpenSiteContainer(session: _win32typing.PyIMAPISession, /) -> _win32typing.PyIMAPIProp: ... -def HrOpenSiteContainerAddressing(session: _win32typing.PyIMAPISession, /) -> _win32typing.PyIMAPIProp: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapi.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapi.pyi index 6b3a42261355..f0f98a3a1d70 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapi.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapi.pyi @@ -100,6 +100,15 @@ FORCE_SAVE: int GENERATE_RECEIPT_ONLY: int KEEP_OPEN_READONLY: int KEEP_OPEN_READWRITE: int +LOGOFF_ABORT: int +LOGOFF_COMPLETE: int +LOGOFF_INBOUND: int +LOGOFF_NO_WAIT: int +LOGOFF_ORDERLY: int +LOGOFF_OUTBOUND: int +LOGOFF_OUTBOUND_QUEUE: int +LOGOFF_PURGE: int +LOGOFF_QUIET: int MAIL_E_NAMENOTFOUND: int MAPI_ABCONT: int MAPI_ADDRBOOK: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapiutil.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapiutil.pyi index f370af558a71..a595c89686cb 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapiutil.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/mapi/mapiutil.pyi @@ -1,19 +1,12 @@ -from _typeshed import Incomplete - -from win32comext.mapi import mapi as mapi, mapitags as mapitags - -TupleType = tuple -ListType = list -IntType = int -prTable: Incomplete +prTable: dict[int, str] def GetPropTagName(pt): ... -mapiErrorTable: Incomplete +mapiErrorTable: dict[int, str] def GetScodeString(hr): ... -ptTable: Incomplete +ptTable: dict[int, str] def GetMapiTypeName(propType, rawType: bool = ...): ... def GetProperties(obj, propList): ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shell.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shell.pyi index f8702c785dce..7688b08f819a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shell.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shell.pyi @@ -354,6 +354,7 @@ IID_IExtractIconW: _win32typing.PyIID IID_IExtractImage: _win32typing.PyIID IID_IFileOperation: _win32typing.PyIID IID_IFileOperationProgressSink: _win32typing.PyIID +IID_IFolderView: _win32typing.PyIID IID_IIdentityName: _win32typing.PyIID IID_IKnownFolder: _win32typing.PyIID IID_IKnownFolderManager: _win32typing.PyIID diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shellcon.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shellcon.pyi index 88e92081b651..8e6090af389b 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shellcon.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32comext/shell/shellcon.pyi @@ -221,6 +221,12 @@ SVSI_DESELECTOTHERS: int SVSI_ENSUREVISIBLE: int SVSI_FOCUSED: int SVSI_TRANSLATEPT: int +SVSI_SELECTIONMARK: int +SVSI_POSITIONITEM: int +SVSI_CHECK: int +SVSI_CHECK2: int +SVSI_KEYBOARDSELECT: int +SVSI_NOTAKEFOCUS: int SVGIO_BACKGROUND: int SVGIO_SELECTION: int SVGIO_ALLVIEW: int @@ -449,6 +455,14 @@ SHCNF_PATH: int SHCNF_PRINTER: int QIF_CACHED: int QIF_DONTEXPANDFOLDER: int +SWFO_NEEDDISPATCH: int +SWFO_INCLUDEPENDING: int +SWFO_COOKIEPASSED: int +SWC_EXPLORER: int +SWC_BROWSER: int +SWC_3RDPARTY: int +SWC_CALLBACK: int +SWC_DESKTOP: int SHARD_PIDL: int SHARD_PATHA: int SHARD_PATHW: int diff --git a/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32verstamp.pyi b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32verstamp.pyi new file mode 100644 index 000000000000..a1f2de1e1c08 --- /dev/null +++ b/packages/pyright-internal/typeshed-fallback/stubs/pywin32/win32verstamp.pyi @@ -0,0 +1 @@ +from win32.lib.win32verstamp import * diff --git a/packages/pyright-internal/typeshed-fallback/stubs/requests/requests/cookies.pyi b/packages/pyright-internal/typeshed-fallback/stubs/requests/requests/cookies.pyi index 65f57e11c6cd..dc0138d896fc 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/requests/requests/cookies.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/requests/requests/cookies.pyi @@ -35,7 +35,7 @@ def remove_cookie_by_name(cookiejar, name, domain=None, path=None): ... class CookieConflictError(RuntimeError): ... -class RequestsCookieJar(CookieJar, MutableMapping[str, str]): # pyright: ignore[reportGeneralTypeIssues] +class RequestsCookieJar(CookieJar, MutableMapping[str, str]): # type: ignore[misc] # conflicting __iter__ in the base classes def get(self, name: str, default: str | None = None, domain: str | None = None, path: str | None = None) -> str | None: ... # type: ignore[override] def set(self, name: str, value: str | Morsel[dict[str, str]], **kwargs) -> Cookie | None: ... def iterkeys(self) -> Iterator[str]: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/METADATA.toml index fa3d3dcfc74b..580c46f519b9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/METADATA.toml @@ -1,4 +1,4 @@ -version = "75.1.*" +version = "75.2.*" upstream_repository = "https://github.com/pypa/setuptools" extra_description = """\ If using `setuptools >= 71.1` *only* for `pkg_resources`, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi index e15c40197fe2..c2a24d44ce03 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi @@ -1,7 +1,8 @@ from _typeshed import Incomplete, StrPath from abc import abstractmethod from collections.abc import Iterable, Mapping, Sequence -from typing import Any, Literal, TypeVar, overload +from typing import Any, Literal, TypedDict, TypeVar, overload, type_check_only +from typing_extensions import NotRequired from ._distutils.cmd import Command as _Command from .command.alias import alias @@ -45,6 +46,14 @@ __all__ = [ __version__: str +@type_check_only +class _BuildInfo(TypedDict): + sources: list[str] | tuple[str, ...] + obj_deps: NotRequired[dict[str, list[str] | tuple[str, ...]]] + macros: NotRequired[list[tuple[str] | tuple[str, str | None]]] + include_dirs: NotRequired[list[str]] + cflags: NotRequired[list[str]] + # Pytype fails with the following: # find_packages = PackageFinder.find # find_namespace_packages = PEP420PackageFinder.find @@ -85,13 +94,15 @@ def setup( command_options: Mapping[str, Mapping[str, tuple[Incomplete, Incomplete]]] = ..., package_data: Mapping[str, list[str]] = ..., include_package_data: bool = ..., - libraries: list[str] = ..., + # libraries for `Distribution` or `build_clib`, not `Extension`, `build_ext` or `CCompiler` + libraries: list[tuple[str, _BuildInfo]] = ..., headers: list[str] = ..., ext_package: str = ..., include_dirs: list[str] = ..., password: str = ..., fullname: str = ..., - **attrs, + # Custom Distributions could accept more params + **attrs: Any, ) -> Distribution: ... class Command(_Command): diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi index 8e11ca80a1bf..2f6521aafe06 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi @@ -12,9 +12,9 @@ def gen_lib_options( compiler: CCompiler, library_dirs: list[str], runtime_library_dirs: list[str], libraries: list[str] ) -> list[str]: ... def gen_preprocess_options(macros: list[_Macro], include_dirs: list[str]) -> list[str]: ... -def get_default_compiler(osname: str | None = ..., platform: str | None = ...) -> str: ... +def get_default_compiler(osname: str | None = None, platform: str | None = None) -> str: ... def new_compiler( - plat: str | None = ..., compiler: str | None = ..., verbose: bool = False, dry_run: bool = False, force: bool = False + plat: str | None = None, compiler: str | None = None, verbose: bool = False, dry_run: bool = False, force: bool = False ) -> CCompiler: ... def show_compilers() -> None: ... @@ -47,7 +47,7 @@ class CCompiler: def set_library_dirs(self, dirs: list[str]) -> None: ... def add_runtime_library_dir(self, dir: str) -> None: ... def set_runtime_library_dirs(self, dirs: list[str]) -> None: ... - def define_macro(self, name: str, value: str | None = ...) -> None: ... + def define_macro(self, name: str, value: str | None = None) -> None: ... def undefine_macro(self, name: str) -> None: ... def add_link_object(self, object: str) -> None: ... def set_link_objects(self, objects: list[str]) -> None: ... @@ -56,10 +56,10 @@ class CCompiler: def has_function( self, funcname: str, - includes: list[str] | None = ..., - include_dirs: list[str] | None = ..., - libraries: list[str] | None = ..., - library_dirs: list[str] | None = ..., + includes: list[str] | None = None, + include_dirs: list[str] | None = None, + libraries: list[str] | None = None, + library_dirs: list[str] | None = None, ) -> bool: ... def library_dir_option(self, dir: str) -> str: ... def library_option(self, lib: str) -> str: ... @@ -68,113 +68,113 @@ class CCompiler: def compile( self, sources: list[str], - output_dir: str | None = ..., - macros: list[_Macro] | None = ..., - include_dirs: list[str] | None = ..., + output_dir: str | None = None, + macros: list[_Macro] | None = None, + include_dirs: list[str] | None = None, debug: bool = False, - extra_preargs: list[str] | None = ..., - extra_postargs: list[str] | None = ..., - depends: list[str] | None = ..., + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + depends: list[str] | None = None, ) -> list[str]: ... def create_static_lib( self, objects: list[str], output_libname: str, - output_dir: str | None = ..., + output_dir: str | None = None, debug: bool = False, - target_lang: str | None = ..., + target_lang: str | None = None, ) -> None: ... def link( self, target_desc: str, objects: list[str], output_filename: str, - output_dir: str | None = ..., - libraries: list[str] | None = ..., - library_dirs: list[str] | None = ..., - runtime_library_dirs: list[str] | None = ..., - export_symbols: list[str] | None = ..., + output_dir: str | None = None, + libraries: list[str] | None = None, + library_dirs: list[str] | None = None, + runtime_library_dirs: list[str] | None = None, + export_symbols: list[str] | None = None, debug: bool = False, - extra_preargs: list[str] | None = ..., - extra_postargs: list[str] | None = ..., - build_temp: str | None = ..., - target_lang: str | None = ..., + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + build_temp: str | None = None, + target_lang: str | None = None, ) -> None: ... def link_executable( self, objects: list[str], output_progname: str, - output_dir: str | None = ..., - libraries: list[str] | None = ..., - library_dirs: list[str] | None = ..., - runtime_library_dirs: list[str] | None = ..., + output_dir: str | None = None, + libraries: list[str] | None = None, + library_dirs: list[str] | None = None, + runtime_library_dirs: list[str] | None = None, debug: bool = False, - extra_preargs: list[str] | None = ..., - extra_postargs: list[str] | None = ..., - target_lang: str | None = ..., + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + target_lang: str | None = None, ) -> None: ... def link_shared_lib( self, objects: list[str], output_libname: str, - output_dir: str | None = ..., - libraries: list[str] | None = ..., - library_dirs: list[str] | None = ..., - runtime_library_dirs: list[str] | None = ..., - export_symbols: list[str] | None = ..., + output_dir: str | None = None, + libraries: list[str] | None = None, + library_dirs: list[str] | None = None, + runtime_library_dirs: list[str] | None = None, + export_symbols: list[str] | None = None, debug: bool = False, - extra_preargs: list[str] | None = ..., - extra_postargs: list[str] | None = ..., - build_temp: str | None = ..., - target_lang: str | None = ..., + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + build_temp: str | None = None, + target_lang: str | None = None, ) -> None: ... def link_shared_object( self, objects: list[str], output_filename: str, - output_dir: str | None = ..., - libraries: list[str] | None = ..., - library_dirs: list[str] | None = ..., - runtime_library_dirs: list[str] | None = ..., - export_symbols: list[str] | None = ..., + output_dir: str | None = None, + libraries: list[str] | None = None, + library_dirs: list[str] | None = None, + runtime_library_dirs: list[str] | None = None, + export_symbols: list[str] | None = None, debug: bool = False, - extra_preargs: list[str] | None = ..., - extra_postargs: list[str] | None = ..., - build_temp: str | None = ..., - target_lang: str | None = ..., + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + build_temp: str | None = None, + target_lang: str | None = None, ) -> None: ... def preprocess( self, source: str, - output_file: str | None = ..., - macros: list[_Macro] | None = ..., - include_dirs: list[str] | None = ..., - extra_preargs: list[str] | None = ..., - extra_postargs: list[str] | None = ..., + output_file: str | None = None, + macros: list[_Macro] | None = None, + include_dirs: list[str] | None = None, + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, ) -> None: ... @overload - def executable_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = ...) -> str: ... + def executable_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = "") -> str: ... @overload - def executable_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = ...) -> str: ... + def executable_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = "") -> str: ... def library_filename( self, libname: str, lib_type: str = "static", strip_dir: bool = False, output_dir: StrPath = "" ) -> str: ... def object_filenames( - self, source_filenames: Iterable[StrPath], strip_dir: bool = False, output_dir: StrPath | None = ... + self, source_filenames: Iterable[StrPath], strip_dir: bool = False, output_dir: StrPath | None = "" ) -> list[str]: ... @overload - def shared_object_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = ...) -> str: ... + def shared_object_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = "") -> str: ... @overload - def shared_object_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = ...) -> str: ... + def shared_object_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = "") -> str: ... def execute( - self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = ..., level: int = ... + self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1 ) -> None: ... def spawn(self, cmd: list[str]) -> None: ... - def mkpath(self, name: str, mode: int = ...) -> None: ... + def mkpath(self, name: str, mode: int = 0o777) -> None: ... @overload def move_file(self, src: StrPath, dst: _StrPathT) -> _StrPathT | str: ... @overload def move_file(self, src: BytesPath, dst: _BytesPathT) -> _BytesPathT | bytes: ... - def announce(self, msg: str, level: int = ...) -> None: ... + def announce(self, msg: str, level: int = 1) -> None: ... def warn(self, msg: str) -> None: ... def debug_print(self, msg: str) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi index 37b3ea9330cc..e43d941b0945 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi @@ -24,9 +24,9 @@ class Command: def finalize_options(self) -> None: ... @abstractmethod def run(self) -> None: ... - def announce(self, msg: str, level: int = ...) -> None: ... + def announce(self, msg: str, level: int = 10) -> None: ... def debug_print(self, msg: str) -> None: ... - def ensure_string(self, option: str, default: str | None = ...) -> None: ... + def ensure_string(self, option: str, default: str | None = None) -> None: ... def ensure_string_list(self, option: str) -> None: ... def ensure_filename(self, option: str) -> None: ... def ensure_dirname(self, option: str) -> None: ... @@ -43,9 +43,9 @@ class Command: def get_sub_commands(self) -> list[str]: ... def warn(self, msg: str) -> None: ... def execute( - self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = ..., level: int = ... + self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1 ) -> None: ... - def mkpath(self, name: str, mode: int = ...) -> None: ... + def mkpath(self, name: str, mode: int = 0o777) -> None: ... @overload def copy_file( self, diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi index 67515b9bf052..6ad82d005ea2 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi @@ -32,7 +32,7 @@ class build_py(Command): def find_all_modules(self): ... def get_source_files(self): ... def get_module_outfile(self, build_dir, package, module): ... - def get_outputs(self, include_bytecode: bool = True): ... + def get_outputs(self, include_bytecode: bool = True) -> list[str]: ... def build_module(self, module, module_file, package): ... def build_modules(self) -> None: ... def build_packages(self) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi index f3c2755983b3..969573e48b32 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi @@ -116,7 +116,7 @@ class Distribution: def reinitialize_command(self, command: str, reinit_subcommands: bool = False) -> Command: ... @overload def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool = False) -> _CommandT: ... - def announce(self, msg, level: int = ...) -> None: ... + def announce(self, msg, level: int = 20) -> None: ... def run_commands(self) -> None: ... def run_command(self, command: str) -> None: ... def has_pure_modules(self) -> bool: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi index 4a74932e1114..e14f5532b51a 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi @@ -6,7 +6,7 @@ from typing import Literal, overload class FileList: allfiles: Iterable[str] | None files: list[str] - def __init__(self, warn: None = ..., debug_print: None = ...) -> None: ... + def __init__(self, warn: None = None, debug_print: None = None) -> None: ... def set_allfiles(self, allfiles: Iterable[str]) -> None: ... def findall(self, dir: str = ...) -> None: ... def debug_print(self, msg: str) -> None: ... @@ -17,21 +17,21 @@ class FileList: def process_template_line(self, line: str) -> None: ... @overload def include_pattern( - self, pattern: str, anchor: bool = True, prefix: str | None = ..., is_regex: Literal[0, False] = 0 + self, pattern: str, anchor: bool = True, prefix: str | None = None, is_regex: Literal[0, False] = 0 ) -> bool: ... @overload def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ... @overload def include_pattern( - self, pattern: str | Pattern[str], anchor: bool = True, prefix: str | None = ..., is_regex: bool = False + self, pattern: str | Pattern[str], anchor: bool = True, prefix: str | None = None, is_regex: bool = False ) -> bool: ... @overload def exclude_pattern( - self, pattern: str, anchor: bool = True, prefix: str | None = ..., is_regex: Literal[0, False] = 0 + self, pattern: str, anchor: bool = True, prefix: str | None = None, is_regex: Literal[0, False] = 0 ) -> bool: ... @overload def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ... @overload def exclude_pattern( - self, pattern: str | Pattern[str], anchor: bool = True, prefix: str | None = ..., is_regex: bool = False + self, pattern: str | Pattern[str], anchor: bool = True, prefix: str | None = None, is_regex: bool = False ) -> bool: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi index dca1990fa022..b75ae74fcab8 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi @@ -17,6 +17,6 @@ def get_config_vars() -> dict[str, str | int]: ... def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ... def get_config_h_filename() -> str: ... def get_makefile_filename() -> str: ... -def get_python_inc(plat_specific: bool = False, prefix: str | None = ...) -> str: ... -def get_python_lib(plat_specific: bool = False, standard_lib: bool = False, prefix: str | None = ...) -> str: ... +def get_python_inc(plat_specific: bool = False, prefix: str | None = None) -> str: ... +def get_python_lib(plat_specific: bool = False, standard_lib: bool = False, prefix: str | None = None) -> str: ... def customize_compiler(compiler: CCompiler) -> None: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi index 9edfccca94f5..7a01252ea5bf 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +++ b/packages/pyright-internal/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi @@ -14,25 +14,25 @@ def convert_path(pathname: str) -> str: ... def change_root(new_root: str, pathname: str) -> str: ... def check_environ() -> None: ... def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ... -def grok_environment_error(exc: object, prefix: str = ...) -> str: ... +def grok_environment_error(exc: object, prefix: str = "error: ") -> str: ... def split_quoted(s: str) -> list[str]: ... def execute( func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], - msg: str | None = ..., + msg: str | None = None, verbose: bool = False, dry_run: bool = False, ) -> None: ... def strtobool(val: str) -> Literal[0, 1]: ... def byte_compile( py_files: list[str], - optimize: int = ..., + optimize: int = 0, force: bool = False, - prefix: str | None = ..., - base_dir: str | None = ..., + prefix: str | None = None, + base_dir: str | None = None, verbose: bool = True, dry_run: bool = False, - direct: bool | None = ..., + direct: bool | None = None, ) -> None: ... def rfc822_escape(header: str) -> str: ... def is_mingw() -> bool: ... diff --git a/packages/pyright-internal/typeshed-fallback/stubs/xmltodict/METADATA.toml b/packages/pyright-internal/typeshed-fallback/stubs/xmltodict/METADATA.toml index 01d8351c2dd0..d3fcc0b4b1f9 100644 --- a/packages/pyright-internal/typeshed-fallback/stubs/xmltodict/METADATA.toml +++ b/packages/pyright-internal/typeshed-fallback/stubs/xmltodict/METADATA.toml @@ -1,2 +1,2 @@ -version = "0.13.*" +version = "0.14.*" upstream_repository = "https://github.com/martinblech/xmltodict"