basedpyright 1.28.3 → 1.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/_hashlib.pyi +15 -2
- package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +7 -4
- package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +2 -178
- package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/builtins.pyi +51 -33
- package/dist/typeshed-fallback/stdlib/configparser.pyi +61 -42
- package/dist/typeshed-fallback/stdlib/contextlib.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +15 -5
- package/dist/typeshed-fallback/stdlib/functools.pyi +18 -13
- package/dist/typeshed-fallback/stdlib/getopt.pyi +15 -3
- package/dist/typeshed-fallback/stdlib/hashlib.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/heapq.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/http/server.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/importlib/readers.pyi +11 -7
- package/dist/typeshed-fallback/stdlib/inspect.pyi +10 -10
- package/dist/typeshed-fallback/stdlib/logging/config.pyi +6 -1
- package/dist/typeshed-fallback/stdlib/math.pyi +33 -3
- package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +13 -9
- package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/shutil.pyi +9 -5
- package/dist/typeshed-fallback/stdlib/socketserver.pyi +8 -8
- package/dist/typeshed-fallback/stdlib/statistics.pyi +14 -15
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +181 -162
- package/dist/typeshed-fallback/stdlib/types.pyi +27 -4
- package/dist/typeshed-fallback/stdlib/typing.pyi +10 -7
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +95 -48
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/xml/dom/NodeFilter.pyi +7 -4
- package/dist/typeshed-fallback/stdlib/xml/dom/__init__.pyi +84 -53
- package/dist/typeshed-fallback/stdlib/xml/dom/expatbuilder.pyi +66 -45
- package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +524 -193
- package/dist/typeshed-fallback/stdlib/xml/dom/pulldom.pyi +70 -55
- package/dist/typeshed-fallback/stdlib/xml/dom/xmlbuilder.pyi +20 -49
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementInclude.pyi +13 -10
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementPath.pyi +19 -12
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +83 -41
- package/dist/typeshed-fallback/stdlib/xml/sax/_exceptions.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/xml/sax/expatreader.pyi +53 -24
- package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +48 -17
- package/dist/typeshed-fallback/stdlib/xml/sax/saxutils.pyi +24 -16
- package/dist/typeshed-fallback/stdlib/xml/sax/xmlreader.pyi +59 -56
- package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +0 -8
- package/dist/typeshed-fallback/stdlib/zipfile/_path/__init__.pyi +32 -52
- package/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi +6 -1
- package/dist/typeshed-fallback/stubs/Deprecated/deprecated/sphinx.pyi +1 -0
- package/dist/typeshed-fallback/stubs/Pygments/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Pygments/pygments/plugin.pyi +11 -3
- package/dist/typeshed-fallback/stubs/RPi.GPIO/RPi/GPIO/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/WTForms/wtforms/validators.pyi +13 -5
- package/dist/typeshed-fallback/stubs/WebOb/webob/__init__.pyi +15 -0
- package/dist/typeshed-fallback/stubs/WebOb/webob/_types.pyi +21 -0
- package/dist/typeshed-fallback/stubs/WebOb/webob/acceptparse.pyi +496 -285
- package/dist/typeshed-fallback/stubs/WebOb/webob/byterange.pyi +2 -0
- package/dist/typeshed-fallback/stubs/WebOb/webob/cachecontrol.pyi +75 -75
- package/dist/typeshed-fallback/stubs/WebOb/webob/client.pyi +2 -0
- package/dist/typeshed-fallback/stubs/WebOb/webob/compat.pyi +24 -0
- package/dist/typeshed-fallback/stubs/WebOb/webob/cookies.pyi +39 -34
- package/dist/typeshed-fallback/stubs/WebOb/webob/datetime_utils.pyi +16 -0
- package/dist/typeshed-fallback/stubs/WebOb/webob/dec.pyi +40 -40
- package/dist/typeshed-fallback/stubs/WebOb/webob/descriptors.pyi +23 -34
- package/dist/typeshed-fallback/stubs/WebOb/webob/etag.pyi +11 -18
- package/dist/typeshed-fallback/stubs/WebOb/webob/exc.pyi +70 -7
- package/dist/typeshed-fallback/stubs/WebOb/webob/headers.pyi +20 -2
- package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +97 -31
- package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +70 -79
- package/dist/typeshed-fallback/stubs/WebOb/webob/response.pyi +62 -62
- package/dist/typeshed-fallback/stubs/WebOb/webob/static.pyi +12 -9
- package/dist/typeshed-fallback/stubs/WebOb/webob/util.pyi +2 -5
- package/dist/typeshed-fallback/stubs/atheris/METADATA.toml +4 -0
- package/dist/typeshed-fallback/stubs/boltons/boltons/dictutils.pyi +1 -3
- package/dist/typeshed-fallback/stubs/boltons/boltons/tbutils.pyi +13 -13
- package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +1 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +2 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/credit_card.pyi +1 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +40 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/paypal_payment_resource.pyi +10 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/paypal_payment_resource_gateway.pyi +10 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/test/credit_card_numbers.pyi +1 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/test/nonces.pyi +1 -0
- package/dist/typeshed-fallback/stubs/cffi/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/cffi/_cffi_backend.pyi +8 -8
- package/dist/typeshed-fallback/stubs/cffi/cffi/recompiler.pyi +1 -0
- package/dist/typeshed-fallback/stubs/corus/METADATA.toml +4 -0
- package/dist/typeshed-fallback/stubs/dirhash/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/dirhash/dirhash/__init__.pyi +93 -0
- package/dist/typeshed-fallback/stubs/dirhash/dirhash/cli.pyi +5 -0
- package/dist/typeshed-fallback/stubs/fanstatic/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fanstatic/fanstatic/registry.pyi +8 -3
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi +2 -8
- package/dist/typeshed-fallback/stubs/geopandas/geopandas/geodataframe.pyi +1 -1
- package/dist/typeshed-fallback/stubs/geopandas/geopandas/io/sql.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gevent/gevent/hub.pyi +1 -1
- package/dist/typeshed-fallback/stubs/gevent/gevent/libev/corecext.pyi +1 -1
- package/dist/typeshed-fallback/stubs/gevent/gevent/libev/corecffi.pyi +1 -1
- package/dist/typeshed-fallback/stubs/gevent/gevent/libuv/loop.pyi +1 -1
- package/dist/typeshed-fallback/stubs/google-cloud-ndb/METADATA.toml +0 -1
- package/dist/typeshed-fallback/stubs/greenlet/greenlet/_greenlet.pyi +5 -1
- package/dist/typeshed-fallback/stubs/hdbcli/hdbcli/dbapi.pyi +1 -1
- package/dist/typeshed-fallback/stubs/hnswlib/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hnswlib/hnswlib.pyi +8 -6
- package/dist/typeshed-fallback/stubs/humanfriendly/METADATA.toml +3 -0
- package/dist/typeshed-fallback/stubs/ibm-db/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +6 -6
- package/dist/typeshed-fallback/stubs/mock/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/mock/mock/backports.pyi +6 -1
- package/dist/typeshed-fallback/stubs/mock/mock/mock.pyi +1 -1
- package/dist/typeshed-fallback/stubs/mysqlclient/MySQLdb/_mysql.pyi +32 -32
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clique.pyi +5 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/matching.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi +8 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi +33 -23
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/treewidth.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi +6 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi +16 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi +7 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi +6 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/asteroidal.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/__init__.pyi +1 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/basic.pyi +8 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi +4 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/covering.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +13 -12
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/extendability.pyi +5 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/generators.pyi +22 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matching.pyi +11 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi +9 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/projection.pyi +9 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/boundary.pyi +53 -58
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bridges.pyi +5 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi +7 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi +10 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/closeness.pyi +7 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi +9 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi +16 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi +10 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +4 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/group.pyi +16 -12
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/katz.pyi +15 -10
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi +6 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/load.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/percolation.pyi +6 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/reaching.pyi +9 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/second_order.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi +5 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/trophic.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +9 -14
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/cluster.pyi +10 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +2 -20
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/communicability_alg.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/centrality.pyi +5 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/community_utils.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/divisive.pyi +5 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kclique.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi +7 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/louvain.pyi +13 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/lukes.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/modularity_max.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/biconnected.pyi +5 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/connected.pyi +5 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/semiconnected.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +5 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/connectivity.pyi +29 -23
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/cuts.pyi +21 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi +17 -16
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi +5 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +7 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcomponents.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/core.pyi +9 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/covering.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/cuts.pyi +10 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/cycles.pyi +9 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +13 -10
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_measures.pyi +8 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_regular.pyi +4 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dominance.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dominating.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/euler.pyi +8 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi +6 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi +4 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi +6 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi +6 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/gomory_hu.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/maxflow.pyi +34 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/mincost.pyi +7 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi +5 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi +6 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +1 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/graph_hashing.pyi +12 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/graphical.pyi +9 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +1 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hybrid.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isolate.pyi +4 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi +1 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorph.pyi +11 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorphvf2.pyi +5 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/temporalisomorphvf2.pyi +2 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi +6 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2userfunc.pyi +2 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi +9 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi +16 -14
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/link_prediction.pyi +9 -10
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/matching.pyi +7 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/minors/contraction.pyi +10 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/mis.pyi +6 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/moral.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/node_classification.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/non_randomness.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/all.pyi +7 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +11 -11
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +14 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/unary.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +6 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/polynomials.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/reciprocity.pyi +4 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/regular.pyi +4 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/richclub.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi +22 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi +7 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +33 -11
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi +9 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi +116 -30
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/similarity.pyi +69 -55
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/simple_paths.pyi +11 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/smallworld.pyi +6 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/smetric.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/sparsifiers.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/structuralholes.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/summarization.pyi +5 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/swap.pyi +8 -5
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/threshold.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/time_dependent.pyi +5 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tournament.pyi +8 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi +5 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi +16 -7
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi +20 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +13 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/coding.pyi +8 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +22 -6
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/recognition.pyi +6 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/triads.pyi +11 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/vitality.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/voronoi.pyi +10 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/walks.pyi +5 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/coreviews.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/graph.pyi +4 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multidigraph.pyi +2 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multigraph.pyi +3 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/reportviews.pyi +39 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/time_series.pyi +4 -0
- package/dist/typeshed-fallback/stubs/passlib/passlib/hosts.pyi +3 -1
- package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +19 -19
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor.pyi +6 -0
- package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/_psycopg.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pycurl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pycurl/pycurl.pyi +18 -0
- package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/build_main.pyi +19 -7
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +18 -16
- package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/utils/hooks/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +4 -4
- package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/__init__.pyi +4 -2
- package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +3 -0
- package/dist/typeshed-fallback/stubs/pynput/pynput/mouse/__init__.pyi +6 -3
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/miniterm.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pytz/pytz/tzinfo.pyi +3 -3
- package/dist/typeshed-fallback/stubs/pywin32/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pywin32/pythoncom.pyi +19 -2
- package/dist/typeshed-fallback/stubs/pywin32/win32/lib/win32con.pyi +4895 -4764
- package/dist/typeshed-fallback/stubs/pywin32/win32/lib/win32timezone.pyi +81 -42
- package/dist/typeshed-fallback/stubs/pywin32/win32/lib/winerror.pyi +7258 -2574
- package/dist/typeshed-fallback/stubs/pywin32/win32/servicemanager.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32trace.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32ts.pyi +1 -0
- package/dist/typeshed-fallback/stubs/pywin32/win32com/client/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +5 -5
- package/dist/typeshed-fallback/stubs/requests/requests/__init__.pyi +12 -13
- package/dist/typeshed-fallback/stubs/requests-oauthlib/requests_oauthlib/oauth1_auth.pyi +3 -0
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +4 -3
- package/dist/typeshed-fallback/stubs/setuptools/distutils/ccompiler.pyi +11 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/compilers/C/base.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/compilers/C/errors.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/distutils/compilers/C/msvc.pyi +1 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_msvccompiler.pyi +2 -21
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +13 -178
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/bdist_rpm.pyi +6 -6
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_clib.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_ext.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +3 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install.pyi +5 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_data.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +4 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/sdist.pyi +6 -6
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compat/__init__.pyi +6 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compilers/C/base.pyi +196 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compilers/C/errors.pyi +6 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compilers/C/msvc.pyi +24 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +23 -20
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/errors.pyi +12 -6
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +12 -11
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/spawn.pyi +6 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +6 -6
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +0 -2
- package/dist/typeshed-fallback/stubs/simplejson/simplejson/encoder.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/moves/builtins.pyi +0 -1
- package/dist/typeshed-fallback/stubs/tqdm/METADATA.toml +4 -1
- package/dist/typeshed-fallback/stubs/tqdm/tqdm/asyncio.pyi +4 -3
- package/dist/typeshed-fallback/stubs/tqdm/tqdm/std.pyi +10 -3
- package/dist/typeshed-fallback/stubs/tree-sitter-languages/METADATA.toml +6 -0
- package/dist/typeshed-fallback/stubs/vobject/vobject/vcard.pyi +15 -8
- package/dist/typeshed-fallback/stubs/watchpoints/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/__init__.pyi +10 -0
- package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/ast_monkey.pyi +3 -0
- package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/util.pyi +6 -0
- package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/watch.pyi +68 -0
- package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/watch_element.pyi +56 -0
- package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/watch_print.pyi +24 -0
- package/dist/typeshed-fallback/stubs/zstd/METADATA.toml +1 -1
- package/package.json +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +0 -543
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/__init__.pyi +0 -8
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/markers.pyi +0 -13
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/requirements.pyi +0 -14
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/specifiers.pyi +0 -66
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/version.pyi +0 -49
|
@@ -1,33 +1,92 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import xml.dom
|
|
3
|
+
from _collections_abc import dict_keys, dict_values
|
|
3
4
|
from _typeshed import Incomplete, ReadableBuffer, SupportsRead, SupportsWrite
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from collections.abc import Iterable, Sequence
|
|
6
|
+
from types import TracebackType
|
|
7
|
+
from typing import Any, ClassVar, Generic, Literal, NoReturn, Protocol, TypeVar, overload
|
|
8
|
+
from typing_extensions import Self, TypeAlias
|
|
9
|
+
from xml.dom.minicompat import EmptyNodeList, NodeList
|
|
7
10
|
from xml.dom.xmlbuilder import DocumentLS, DOMImplementationLS
|
|
8
11
|
from xml.sax.xmlreader import XMLReader
|
|
9
12
|
|
|
13
|
+
_NSName: TypeAlias = tuple[str | None, str]
|
|
14
|
+
|
|
15
|
+
# Entity can also have children, but it's not implemented the same way as the
|
|
16
|
+
# others, so is deliberately omitted here.
|
|
17
|
+
_NodesWithChildren: TypeAlias = DocumentFragment | Attr | Element | Document
|
|
18
|
+
_NodesThatAreChildren: TypeAlias = CDATASection | Comment | DocumentType | Element | Notation | ProcessingInstruction | Text
|
|
19
|
+
|
|
20
|
+
_AttrChildren: TypeAlias = Text # Also EntityReference, but we don't implement it
|
|
21
|
+
_ElementChildren: TypeAlias = Element | ProcessingInstruction | Comment | Text | CDATASection
|
|
22
|
+
_EntityChildren: TypeAlias = Text # I think; documentation is a little unclear
|
|
23
|
+
_DocumentFragmentChildren: TypeAlias = Element | Text | CDATASection | ProcessingInstruction | Comment | Notation
|
|
24
|
+
_DocumentChildren: TypeAlias = Comment | DocumentType | Element | ProcessingInstruction
|
|
25
|
+
|
|
10
26
|
_N = TypeVar("_N", bound=Node)
|
|
27
|
+
_ChildNodeVar = TypeVar("_ChildNodeVar", bound=_NodesThatAreChildren)
|
|
28
|
+
_ChildNodePlusFragmentVar = TypeVar("_ChildNodePlusFragmentVar", bound=_NodesThatAreChildren | DocumentFragment)
|
|
29
|
+
_DocumentChildrenVar = TypeVar("_DocumentChildrenVar", bound=_DocumentChildren)
|
|
30
|
+
_ImportableNodeVar = TypeVar(
|
|
31
|
+
"_ImportableNodeVar",
|
|
32
|
+
bound=DocumentFragment
|
|
33
|
+
| Attr
|
|
34
|
+
| Element
|
|
35
|
+
| ProcessingInstruction
|
|
36
|
+
| CharacterData
|
|
37
|
+
| Text
|
|
38
|
+
| Comment
|
|
39
|
+
| CDATASection
|
|
40
|
+
| Entity
|
|
41
|
+
| Notation,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
class _DOMErrorHandler(Protocol):
|
|
45
|
+
def handleError(self, error: Exception) -> bool: ...
|
|
46
|
+
|
|
47
|
+
class _UserDataHandler(Protocol):
|
|
48
|
+
def handle(self, operation: int, key: str, data: Any, src: Node, dst: Node) -> None: ...
|
|
11
49
|
|
|
12
50
|
def parse(
|
|
13
51
|
file: str | SupportsRead[ReadableBuffer | str], parser: XMLReader | None = None, bufsize: int | None = None
|
|
14
52
|
) -> Document: ...
|
|
15
53
|
def parseString(string: str | ReadableBuffer, parser: XMLReader | None = None) -> Document: ...
|
|
16
|
-
|
|
54
|
+
@overload
|
|
55
|
+
def getDOMImplementation(features: None = None) -> DOMImplementation: ...
|
|
56
|
+
@overload
|
|
57
|
+
def getDOMImplementation(features: str | Iterable[tuple[str, str | None]]) -> DOMImplementation | None: ...
|
|
17
58
|
|
|
18
59
|
class Node(xml.dom.Node):
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
prefix:
|
|
60
|
+
parentNode: _NodesWithChildren | Entity | None
|
|
61
|
+
ownerDocument: Document | None
|
|
62
|
+
nextSibling: _NodesThatAreChildren | None
|
|
63
|
+
previousSibling: _NodesThatAreChildren | None
|
|
64
|
+
namespaceURI: str | None # non-null only for Element and Attr
|
|
65
|
+
prefix: str | None # non-null only for NS Element and Attr
|
|
66
|
+
|
|
67
|
+
# These aren't defined on Node, but they exist on all Node subclasses
|
|
68
|
+
# and various methods of Node require them to exist.
|
|
69
|
+
childNodes: (
|
|
70
|
+
NodeList[_DocumentFragmentChildren]
|
|
71
|
+
| NodeList[_AttrChildren]
|
|
72
|
+
| NodeList[_ElementChildren]
|
|
73
|
+
| NodeList[_DocumentChildren]
|
|
74
|
+
| NodeList[_EntityChildren]
|
|
75
|
+
| EmptyNodeList
|
|
76
|
+
)
|
|
77
|
+
nodeType: ClassVar[Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]
|
|
78
|
+
nodeName: str | None # only possibly None on DocumentType
|
|
79
|
+
|
|
80
|
+
# Not defined on Node, but exist on all Node subclasses.
|
|
81
|
+
nodeValue: str | None # non-null for Attr, ProcessingInstruction, Text, Comment, and CDATASection
|
|
82
|
+
attributes: NamedNodeMap | None # non-null only for Element
|
|
83
|
+
|
|
25
84
|
@property
|
|
26
|
-
def firstChild(self) ->
|
|
85
|
+
def firstChild(self) -> _NodesThatAreChildren | None:
|
|
27
86
|
"""First child node, or None."""
|
|
28
87
|
...
|
|
29
88
|
@property
|
|
30
|
-
def lastChild(self) ->
|
|
89
|
+
def lastChild(self) -> _NodesThatAreChildren | None:
|
|
31
90
|
"""Last child node, or None."""
|
|
32
91
|
...
|
|
33
92
|
@property
|
|
@@ -101,45 +160,109 @@ class Node(xml.dom.Node):
|
|
|
101
160
|
) -> bytes: ...
|
|
102
161
|
|
|
103
162
|
def hasChildNodes(self) -> bool: ...
|
|
104
|
-
def insertBefore(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
def
|
|
114
|
-
|
|
115
|
-
|
|
163
|
+
def insertBefore( # type: ignore[misc]
|
|
164
|
+
self: _NodesWithChildren, # pyright: ignore[reportGeneralTypeIssues]
|
|
165
|
+
newChild: _ChildNodePlusFragmentVar,
|
|
166
|
+
refChild: _NodesThatAreChildren | None,
|
|
167
|
+
) -> _ChildNodePlusFragmentVar: ...
|
|
168
|
+
def appendChild( # type: ignore[misc]
|
|
169
|
+
self: _NodesWithChildren, node: _ChildNodePlusFragmentVar # pyright: ignore[reportGeneralTypeIssues]
|
|
170
|
+
) -> _ChildNodePlusFragmentVar: ...
|
|
171
|
+
@overload
|
|
172
|
+
def replaceChild( # type: ignore[misc]
|
|
173
|
+
self: _NodesWithChildren, newChild: DocumentFragment, oldChild: _ChildNodeVar
|
|
174
|
+
) -> _ChildNodeVar | DocumentFragment: ...
|
|
175
|
+
@overload
|
|
176
|
+
def replaceChild( # type: ignore[misc]
|
|
177
|
+
self: _NodesWithChildren, newChild: _NodesThatAreChildren, oldChild: _ChildNodeVar
|
|
178
|
+
) -> _ChildNodeVar | None: ...
|
|
179
|
+
def removeChild(self: _NodesWithChildren, oldChild: _ChildNodeVar) -> _ChildNodeVar: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
|
180
|
+
def normalize(self: _NodesWithChildren) -> None: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
|
181
|
+
def cloneNode(self, deep: bool) -> Self | None: ...
|
|
182
|
+
def isSupported(self, feature: str, version: str | None) -> bool: ...
|
|
183
|
+
def isSameNode(self, other: Node) -> bool: ...
|
|
184
|
+
def getInterface(self, feature: str) -> Self | None: ...
|
|
185
|
+
def getUserData(self, key: str) -> Any | None: ...
|
|
186
|
+
def setUserData(self, key: str, data: Any, handler: _UserDataHandler) -> Any: ...
|
|
116
187
|
def unlink(self) -> None: ...
|
|
117
188
|
def __enter__(self) -> Self: ...
|
|
118
|
-
def __exit__(self, et, ev, tb) -> None: ...
|
|
189
|
+
def __exit__(self, et: type[BaseException] | None, ev: BaseException | None, tb: TracebackType | None) -> None: ...
|
|
190
|
+
|
|
191
|
+
_DFChildrenVar = TypeVar("_DFChildrenVar", bound=_DocumentFragmentChildren)
|
|
192
|
+
_DFChildrenPlusFragment = TypeVar("_DFChildrenPlusFragment", bound=_DocumentFragmentChildren | DocumentFragment)
|
|
119
193
|
|
|
120
194
|
class DocumentFragment(Node):
|
|
121
|
-
nodeType:
|
|
122
|
-
nodeName:
|
|
123
|
-
nodeValue:
|
|
124
|
-
attributes:
|
|
125
|
-
|
|
126
|
-
|
|
195
|
+
nodeType: ClassVar[Literal[11]]
|
|
196
|
+
nodeName: Literal["#document-fragment"]
|
|
197
|
+
nodeValue: None
|
|
198
|
+
attributes: None
|
|
199
|
+
|
|
200
|
+
parentNode: None
|
|
201
|
+
nextSibling: None
|
|
202
|
+
previousSibling: None
|
|
203
|
+
childNodes: NodeList[_DocumentFragmentChildren]
|
|
204
|
+
@property
|
|
205
|
+
def firstChild(self) -> _DocumentFragmentChildren | None:
|
|
206
|
+
"""First child node, or None."""
|
|
207
|
+
...
|
|
208
|
+
@property
|
|
209
|
+
def lastChild(self) -> _DocumentFragmentChildren | None:
|
|
210
|
+
"""Last child node, or None."""
|
|
211
|
+
...
|
|
212
|
+
|
|
213
|
+
namespaceURI: None
|
|
214
|
+
prefix: None
|
|
215
|
+
@property
|
|
216
|
+
def localName(self) -> None:
|
|
217
|
+
"""Namespace-local name of this node."""
|
|
218
|
+
...
|
|
127
219
|
def __init__(self) -> None: ...
|
|
220
|
+
def insertBefore( # type: ignore[override]
|
|
221
|
+
self, newChild: _DFChildrenPlusFragment, refChild: _DocumentFragmentChildren | None
|
|
222
|
+
) -> _DFChildrenPlusFragment: ...
|
|
223
|
+
def appendChild(self, node: _DFChildrenPlusFragment) -> _DFChildrenPlusFragment: ... # type: ignore[override]
|
|
224
|
+
@overload # type: ignore[override]
|
|
225
|
+
def replaceChild(self, newChild: DocumentFragment, oldChild: _DFChildrenVar) -> _DFChildrenVar | DocumentFragment: ...
|
|
226
|
+
@overload
|
|
227
|
+
def replaceChild(self, newChild: _DocumentFragmentChildren, oldChild: _DFChildrenVar) -> _DFChildrenVar | None: ... # type: ignore[override]
|
|
228
|
+
def removeChild(self, oldChild: _DFChildrenVar) -> _DFChildrenVar: ... # type: ignore[override]
|
|
229
|
+
|
|
230
|
+
_AttrChildrenVar = TypeVar("_AttrChildrenVar", bound=_AttrChildren)
|
|
231
|
+
_AttrChildrenPlusFragment = TypeVar("_AttrChildrenPlusFragment", bound=_AttrChildren | DocumentFragment)
|
|
128
232
|
|
|
129
233
|
class Attr(Node):
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
234
|
+
nodeType: ClassVar[Literal[2]]
|
|
235
|
+
nodeName: str # same as Attr.name
|
|
236
|
+
nodeValue: str # same as Attr.value
|
|
237
|
+
attributes: None
|
|
238
|
+
|
|
239
|
+
parentNode: None
|
|
240
|
+
nextSibling: None
|
|
241
|
+
previousSibling: None
|
|
242
|
+
childNodes: NodeList[_AttrChildren]
|
|
243
|
+
@property
|
|
244
|
+
def firstChild(self) -> _AttrChildren | None:
|
|
245
|
+
"""First child node, or None."""
|
|
246
|
+
...
|
|
247
|
+
@property
|
|
248
|
+
def lastChild(self) -> _AttrChildren | None:
|
|
249
|
+
"""Last child node, or None."""
|
|
250
|
+
...
|
|
251
|
+
|
|
135
252
|
namespaceURI: str | None
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
253
|
+
prefix: str | None
|
|
254
|
+
@property
|
|
255
|
+
def localName(self) -> str:
|
|
256
|
+
"""Namespace-local name of this attribute."""
|
|
257
|
+
...
|
|
258
|
+
|
|
259
|
+
name: str
|
|
139
260
|
value: str
|
|
140
|
-
|
|
261
|
+
specified: bool
|
|
262
|
+
ownerElement: Element | None
|
|
263
|
+
|
|
141
264
|
def __init__(
|
|
142
|
-
self, qName: str, namespaceURI: str | None = None, localName: str | None = None, prefix:
|
|
265
|
+
self, qName: str, namespaceURI: str | None = None, localName: str | None = None, prefix: str | None = None
|
|
143
266
|
) -> None: ...
|
|
144
267
|
def unlink(self) -> None: ...
|
|
145
268
|
@property
|
|
@@ -147,20 +270,33 @@ class Attr(Node):
|
|
|
147
270
|
"""True if this attribute is an ID."""
|
|
148
271
|
...
|
|
149
272
|
@property
|
|
150
|
-
def schemaType(self):
|
|
273
|
+
def schemaType(self) -> TypeInfo:
|
|
151
274
|
"""Schema type for this attribute."""
|
|
152
275
|
...
|
|
276
|
+
def insertBefore(self, newChild: _AttrChildrenPlusFragment, refChild: _AttrChildren | None) -> _AttrChildrenPlusFragment: ... # type: ignore[override]
|
|
277
|
+
def appendChild(self, node: _AttrChildrenPlusFragment) -> _AttrChildrenPlusFragment: ... # type: ignore[override]
|
|
278
|
+
@overload # type: ignore[override]
|
|
279
|
+
def replaceChild(self, newChild: DocumentFragment, oldChild: _AttrChildrenVar) -> _AttrChildrenVar | DocumentFragment: ...
|
|
280
|
+
@overload
|
|
281
|
+
def replaceChild(self, newChild: _AttrChildren, oldChild: _AttrChildrenVar) -> _AttrChildrenVar | None: ... # type: ignore[override]
|
|
282
|
+
def removeChild(self, oldChild: _AttrChildrenVar) -> _AttrChildrenVar: ... # type: ignore[override]
|
|
153
283
|
|
|
284
|
+
# In the DOM, this interface isn't specific to Attr, but our implementation is
|
|
285
|
+
# because that's the only place we use it.
|
|
154
286
|
class NamedNodeMap:
|
|
155
|
-
def __init__(self, attrs, attrsNS, ownerElement) -> None: ...
|
|
156
|
-
|
|
157
|
-
def
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
def
|
|
161
|
-
def
|
|
162
|
-
def
|
|
163
|
-
def
|
|
287
|
+
def __init__(self, attrs: dict[str, Attr], attrsNS: dict[_NSName, Attr], ownerElement: Element) -> None: ...
|
|
288
|
+
@property
|
|
289
|
+
def length(self) -> int:
|
|
290
|
+
"""Number of nodes in the NamedNodeMap."""
|
|
291
|
+
...
|
|
292
|
+
def item(self, index: int) -> Node | None: ...
|
|
293
|
+
def items(self) -> list[tuple[str, str]]: ...
|
|
294
|
+
def itemsNS(self) -> list[tuple[_NSName, str]]: ...
|
|
295
|
+
def __contains__(self, key: str | _NSName) -> bool: ...
|
|
296
|
+
def keys(self) -> dict_keys[str, Attr]: ...
|
|
297
|
+
def keysNS(self) -> dict_keys[_NSName, Attr]: ...
|
|
298
|
+
def values(self) -> dict_values[str, Attr]: ...
|
|
299
|
+
def get(self, name: str, value: Attr | None = None) -> Attr | None: ...
|
|
164
300
|
__hash__: ClassVar[None] # type: ignore[assignment]
|
|
165
301
|
def __len__(self) -> int: ...
|
|
166
302
|
def __eq__(self, other: object) -> bool: ...
|
|
@@ -168,114 +304,193 @@ class NamedNodeMap:
|
|
|
168
304
|
def __gt__(self, other: NamedNodeMap) -> bool: ...
|
|
169
305
|
def __le__(self, other: NamedNodeMap) -> bool: ...
|
|
170
306
|
def __lt__(self, other: NamedNodeMap) -> bool: ...
|
|
171
|
-
def __getitem__(self, attname_or_tuple:
|
|
307
|
+
def __getitem__(self, attname_or_tuple: _NSName | str) -> Attr: ...
|
|
172
308
|
def __setitem__(self, attname: str, value: Attr | str) -> None: ...
|
|
173
309
|
def getNamedItem(self, name: str) -> Attr | None: ...
|
|
174
|
-
def getNamedItemNS(self, namespaceURI: str, localName: str
|
|
310
|
+
def getNamedItemNS(self, namespaceURI: str | None, localName: str) -> Attr | None: ...
|
|
175
311
|
def removeNamedItem(self, name: str) -> Attr: ...
|
|
176
|
-
def removeNamedItemNS(self, namespaceURI: str, localName: str
|
|
177
|
-
def setNamedItem(self, node: Attr) -> Attr: ...
|
|
178
|
-
def setNamedItemNS(self, node: Attr) -> Attr: ...
|
|
179
|
-
def __delitem__(self, attname_or_tuple:
|
|
180
|
-
@property
|
|
181
|
-
def length(self) -> int:
|
|
182
|
-
"""Number of nodes in the NamedNodeMap."""
|
|
183
|
-
...
|
|
312
|
+
def removeNamedItemNS(self, namespaceURI: str | None, localName: str) -> Attr: ...
|
|
313
|
+
def setNamedItem(self, node: Attr) -> Attr | None: ...
|
|
314
|
+
def setNamedItemNS(self, node: Attr) -> Attr | None: ...
|
|
315
|
+
def __delitem__(self, attname_or_tuple: _NSName | str) -> None: ...
|
|
184
316
|
|
|
185
317
|
AttributeList = NamedNodeMap
|
|
186
318
|
|
|
187
319
|
class TypeInfo:
|
|
188
|
-
namespace:
|
|
189
|
-
name: str
|
|
190
|
-
def __init__(self, namespace: Incomplete | None, name: str) -> None: ...
|
|
320
|
+
namespace: str | None
|
|
321
|
+
name: str | None
|
|
322
|
+
def __init__(self, namespace: Incomplete | None, name: str | None) -> None: ...
|
|
323
|
+
|
|
324
|
+
_ElementChildrenVar = TypeVar("_ElementChildrenVar", bound=_ElementChildren)
|
|
325
|
+
_ElementChildrenPlusFragment = TypeVar("_ElementChildrenPlusFragment", bound=_ElementChildren | DocumentFragment)
|
|
191
326
|
|
|
192
327
|
class Element(Node):
|
|
193
|
-
nodeType:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
328
|
+
nodeType: ClassVar[Literal[1]]
|
|
329
|
+
nodeName: str # same as Element.tagName
|
|
330
|
+
nodeValue: None
|
|
331
|
+
@property
|
|
332
|
+
def attributes(self) -> NamedNodeMap:
|
|
333
|
+
"""NamedNodeMap of attributes on the element."""
|
|
334
|
+
...
|
|
335
|
+
|
|
336
|
+
parentNode: Document | Element | DocumentFragment | None
|
|
337
|
+
nextSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None
|
|
338
|
+
previousSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None
|
|
339
|
+
childNodes: NodeList[_ElementChildren]
|
|
340
|
+
@property
|
|
341
|
+
def firstChild(self) -> _ElementChildren | None:
|
|
342
|
+
"""First child node, or None."""
|
|
343
|
+
...
|
|
344
|
+
@property
|
|
345
|
+
def lastChild(self) -> _ElementChildren | None:
|
|
346
|
+
"""Last child node, or None."""
|
|
347
|
+
...
|
|
348
|
+
|
|
200
349
|
namespaceURI: str | None
|
|
201
|
-
|
|
202
|
-
|
|
350
|
+
prefix: str | None
|
|
351
|
+
@property
|
|
352
|
+
def localName(self) -> str:
|
|
353
|
+
"""Namespace-local name of this element."""
|
|
354
|
+
...
|
|
355
|
+
|
|
356
|
+
schemaType: TypeInfo
|
|
357
|
+
tagName: str
|
|
358
|
+
|
|
203
359
|
def __init__(
|
|
204
|
-
self, tagName, namespaceURI: str | None = None, prefix:
|
|
360
|
+
self, tagName: str, namespaceURI: str | None = None, prefix: str | None = None, localName: str | None = None
|
|
205
361
|
) -> None: ...
|
|
206
362
|
def unlink(self) -> None: ...
|
|
207
363
|
def getAttribute(self, attname: str) -> str: ...
|
|
208
|
-
def getAttributeNS(self, namespaceURI: str, localName): ...
|
|
364
|
+
def getAttributeNS(self, namespaceURI: str | None, localName: str) -> str: ...
|
|
209
365
|
def setAttribute(self, attname: str, value: str) -> None: ...
|
|
210
|
-
def setAttributeNS(self, namespaceURI: str, qualifiedName: str, value) -> None: ...
|
|
211
|
-
def getAttributeNode(self, attrname: str): ...
|
|
212
|
-
def getAttributeNodeNS(self, namespaceURI: str, localName): ...
|
|
213
|
-
def setAttributeNode(self, attr): ...
|
|
214
|
-
setAttributeNodeNS
|
|
366
|
+
def setAttributeNS(self, namespaceURI: str | None, qualifiedName: str, value: str) -> None: ...
|
|
367
|
+
def getAttributeNode(self, attrname: str) -> Attr | None: ...
|
|
368
|
+
def getAttributeNodeNS(self, namespaceURI: str | None, localName: str) -> Attr | None: ...
|
|
369
|
+
def setAttributeNode(self, attr: Attr) -> Attr | None: ...
|
|
370
|
+
setAttributeNodeNS = setAttributeNode
|
|
215
371
|
def removeAttribute(self, name: str) -> None: ...
|
|
216
|
-
def removeAttributeNS(self, namespaceURI: str, localName) -> None: ...
|
|
217
|
-
def removeAttributeNode(self, node): ...
|
|
218
|
-
removeAttributeNodeNS
|
|
372
|
+
def removeAttributeNS(self, namespaceURI: str | None, localName: str) -> None: ...
|
|
373
|
+
def removeAttributeNode(self, node: Attr) -> Attr: ...
|
|
374
|
+
removeAttributeNodeNS = removeAttributeNode
|
|
219
375
|
def hasAttribute(self, name: str) -> bool: ...
|
|
220
|
-
def hasAttributeNS(self, namespaceURI: str, localName) -> bool: ...
|
|
376
|
+
def hasAttributeNS(self, namespaceURI: str | None, localName: str) -> bool: ...
|
|
221
377
|
def getElementsByTagName(self, name: str) -> NodeList[Element]: ...
|
|
222
|
-
def getElementsByTagNameNS(self, namespaceURI: str, localName: str) -> NodeList[Element]: ...
|
|
378
|
+
def getElementsByTagNameNS(self, namespaceURI: str | None, localName: str) -> NodeList[Element]: ...
|
|
223
379
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
224
380
|
def hasAttributes(self) -> bool: ...
|
|
225
|
-
def setIdAttribute(self, name) -> None: ...
|
|
226
|
-
def setIdAttributeNS(self, namespaceURI: str, localName) -> None: ...
|
|
227
|
-
def setIdAttributeNode(self, idAttr) -> None: ...
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
381
|
+
def setIdAttribute(self, name: str) -> None: ...
|
|
382
|
+
def setIdAttributeNS(self, namespaceURI: str | None, localName: str) -> None: ...
|
|
383
|
+
def setIdAttributeNode(self, idAttr: Attr) -> None: ...
|
|
384
|
+
def insertBefore( # type: ignore[override]
|
|
385
|
+
self, newChild: _ElementChildrenPlusFragment, refChild: _ElementChildren | None
|
|
386
|
+
) -> _ElementChildrenPlusFragment: ...
|
|
387
|
+
def appendChild(self, node: _ElementChildrenPlusFragment) -> _ElementChildrenPlusFragment: ... # type: ignore[override]
|
|
388
|
+
@overload # type: ignore[override]
|
|
389
|
+
def replaceChild(
|
|
390
|
+
self, newChild: DocumentFragment, oldChild: _ElementChildrenVar
|
|
391
|
+
) -> _ElementChildrenVar | DocumentFragment: ...
|
|
392
|
+
@overload
|
|
393
|
+
def replaceChild(self, newChild: _ElementChildren, oldChild: _ElementChildrenVar) -> _ElementChildrenVar | None: ... # type: ignore[override]
|
|
394
|
+
def removeChild(self, oldChild: _ElementChildrenVar) -> _ElementChildrenVar: ... # type: ignore[override]
|
|
232
395
|
|
|
233
396
|
class Childless:
|
|
234
|
-
attributes:
|
|
235
|
-
childNodes:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
def
|
|
240
|
-
def
|
|
241
|
-
def
|
|
397
|
+
attributes: None
|
|
398
|
+
childNodes: EmptyNodeList
|
|
399
|
+
@property
|
|
400
|
+
def firstChild(self) -> None: ...
|
|
401
|
+
@property
|
|
402
|
+
def lastChild(self) -> None: ...
|
|
403
|
+
def appendChild(self, node: _NodesThatAreChildren | DocumentFragment) -> NoReturn: ...
|
|
404
|
+
def hasChildNodes(self) -> Literal[False]: ...
|
|
405
|
+
def insertBefore(
|
|
406
|
+
self, newChild: _NodesThatAreChildren | DocumentFragment, refChild: _NodesThatAreChildren | None
|
|
407
|
+
) -> NoReturn: ...
|
|
408
|
+
def removeChild(self, oldChild: _NodesThatAreChildren) -> NoReturn: ...
|
|
242
409
|
def normalize(self) -> None: ...
|
|
243
|
-
def replaceChild(self, newChild, oldChild) -> NoReturn: ...
|
|
410
|
+
def replaceChild(self, newChild: _NodesThatAreChildren | DocumentFragment, oldChild: _NodesThatAreChildren) -> NoReturn: ...
|
|
244
411
|
|
|
245
412
|
class ProcessingInstruction(Childless, Node):
|
|
246
|
-
nodeType:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
413
|
+
nodeType: ClassVar[Literal[7]]
|
|
414
|
+
nodeName: str # same as ProcessingInstruction.target
|
|
415
|
+
nodeValue: str # same as ProcessingInstruction.data
|
|
416
|
+
attributes: None
|
|
417
|
+
|
|
418
|
+
parentNode: Document | Element | DocumentFragment | None
|
|
419
|
+
nextSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None
|
|
420
|
+
previousSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None
|
|
421
|
+
childNodes: EmptyNodeList
|
|
422
|
+
@property
|
|
423
|
+
def firstChild(self) -> None: ...
|
|
424
|
+
@property
|
|
425
|
+
def lastChild(self) -> None: ...
|
|
426
|
+
|
|
427
|
+
namespaceURI: None
|
|
428
|
+
prefix: None
|
|
429
|
+
@property
|
|
430
|
+
def localName(self) -> None:
|
|
431
|
+
"""Namespace-local name of this node."""
|
|
432
|
+
...
|
|
433
|
+
|
|
434
|
+
target: str
|
|
435
|
+
data: str
|
|
436
|
+
|
|
437
|
+
def __init__(self, target: str, data: str) -> None: ...
|
|
252
438
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
253
439
|
|
|
254
440
|
class CharacterData(Childless, Node):
|
|
255
|
-
|
|
256
|
-
|
|
441
|
+
nodeValue: str
|
|
442
|
+
attributes: None
|
|
443
|
+
|
|
444
|
+
childNodes: EmptyNodeList
|
|
445
|
+
nextSibling: _NodesThatAreChildren | None
|
|
446
|
+
previousSibling: _NodesThatAreChildren | None
|
|
447
|
+
|
|
448
|
+
@property
|
|
449
|
+
def localName(self) -> None:
|
|
450
|
+
"""Namespace-local name of this node."""
|
|
451
|
+
...
|
|
452
|
+
|
|
453
|
+
ownerDocument: Document | None
|
|
454
|
+
data: str
|
|
455
|
+
|
|
257
456
|
def __init__(self) -> None: ...
|
|
457
|
+
@property
|
|
458
|
+
def length(self) -> int:
|
|
459
|
+
"""Length of the string data."""
|
|
460
|
+
...
|
|
258
461
|
def __len__(self) -> int: ...
|
|
259
|
-
data: str
|
|
260
|
-
nodeValue: Incomplete
|
|
261
462
|
def substringData(self, offset: int, count: int) -> str: ...
|
|
262
463
|
def appendData(self, arg: str) -> None: ...
|
|
263
464
|
def insertData(self, offset: int, arg: str) -> None: ...
|
|
264
465
|
def deleteData(self, offset: int, count: int) -> None: ...
|
|
265
466
|
def replaceData(self, offset: int, count: int, arg: str) -> None: ...
|
|
467
|
+
|
|
468
|
+
class Text(CharacterData):
|
|
469
|
+
nodeType: ClassVar[Literal[3]]
|
|
470
|
+
nodeName: Literal["#text"]
|
|
471
|
+
nodeValue: str # same as CharacterData.data, the content of the text node
|
|
472
|
+
attributes: None
|
|
473
|
+
|
|
474
|
+
parentNode: Attr | Element | DocumentFragment | None
|
|
475
|
+
nextSibling: _DocumentFragmentChildren | _ElementChildren | _AttrChildren | None
|
|
476
|
+
previousSibling: _DocumentFragmentChildren | _ElementChildren | _AttrChildren | None
|
|
477
|
+
childNodes: EmptyNodeList
|
|
266
478
|
@property
|
|
267
|
-
def
|
|
268
|
-
|
|
479
|
+
def firstChild(self) -> None: ...
|
|
480
|
+
@property
|
|
481
|
+
def lastChild(self) -> None: ...
|
|
482
|
+
|
|
483
|
+
namespaceURI: None
|
|
484
|
+
prefix: None
|
|
485
|
+
@property
|
|
486
|
+
def localName(self) -> None:
|
|
487
|
+
"""Namespace-local name of this node."""
|
|
269
488
|
...
|
|
270
489
|
|
|
271
|
-
|
|
272
|
-
nodeType: int
|
|
273
|
-
nodeName: str
|
|
274
|
-
attributes: Incomplete
|
|
275
|
-
data: Incomplete
|
|
490
|
+
data: str
|
|
276
491
|
def splitText(self, offset: int) -> Self: ...
|
|
277
492
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
278
|
-
def replaceWholeText(self, content) -> Self | None: ...
|
|
493
|
+
def replaceWholeText(self, content: str) -> Self | None: ...
|
|
279
494
|
@property
|
|
280
495
|
def isWhitespaceInElementContent(self) -> bool:
|
|
281
496
|
"""True iff this text node contains only whitespace and is in element content."""
|
|
@@ -286,27 +501,52 @@ class Text(CharacterData):
|
|
|
286
501
|
...
|
|
287
502
|
|
|
288
503
|
class Comment(CharacterData):
|
|
289
|
-
nodeType:
|
|
290
|
-
nodeName:
|
|
291
|
-
|
|
504
|
+
nodeType: ClassVar[Literal[8]]
|
|
505
|
+
nodeName: Literal["#comment"]
|
|
506
|
+
nodeValue: str # same as CharacterData.data, the content of the comment
|
|
507
|
+
attributes: None
|
|
508
|
+
|
|
509
|
+
parentNode: Document | Element | DocumentFragment | None
|
|
510
|
+
nextSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None
|
|
511
|
+
previousSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None
|
|
512
|
+
childNodes: EmptyNodeList
|
|
513
|
+
@property
|
|
514
|
+
def firstChild(self) -> None: ...
|
|
515
|
+
@property
|
|
516
|
+
def lastChild(self) -> None: ...
|
|
517
|
+
|
|
518
|
+
namespaceURI: None
|
|
519
|
+
prefix: None
|
|
520
|
+
@property
|
|
521
|
+
def localName(self) -> None:
|
|
522
|
+
"""Namespace-local name of this node."""
|
|
523
|
+
...
|
|
524
|
+
def __init__(self, data: str) -> None: ...
|
|
292
525
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
293
526
|
|
|
294
527
|
class CDATASection(Text):
|
|
295
|
-
nodeType:
|
|
296
|
-
nodeName:
|
|
528
|
+
nodeType: ClassVar[Literal[4]] # type: ignore[assignment]
|
|
529
|
+
nodeName: Literal["#cdata-section"] # type: ignore[assignment]
|
|
530
|
+
nodeValue: str # same as CharacterData.data, the content of the CDATA Section
|
|
531
|
+
attributes: None
|
|
532
|
+
|
|
533
|
+
parentNode: Element | DocumentFragment | None
|
|
534
|
+
nextSibling: _DocumentFragmentChildren | _ElementChildren | None
|
|
535
|
+
previousSibling: _DocumentFragmentChildren | _ElementChildren | None
|
|
536
|
+
|
|
297
537
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
298
538
|
|
|
299
|
-
class ReadOnlySequentialNamedNodeMap:
|
|
300
|
-
def __init__(self, seq=()) -> None: ...
|
|
539
|
+
class ReadOnlySequentialNamedNodeMap(Generic[_N]):
|
|
540
|
+
def __init__(self, seq: Sequence[_N] = ()) -> None: ...
|
|
301
541
|
def __len__(self) -> int: ...
|
|
302
|
-
def getNamedItem(self, name): ...
|
|
303
|
-
def getNamedItemNS(self, namespaceURI: str, localName): ...
|
|
304
|
-
def __getitem__(self, name_or_tuple): ...
|
|
305
|
-
def item(self, index): ...
|
|
306
|
-
def removeNamedItem(self, name) ->
|
|
307
|
-
def removeNamedItemNS(self, namespaceURI: str, localName) ->
|
|
308
|
-
def setNamedItem(self, node) ->
|
|
309
|
-
def setNamedItemNS(self, node) ->
|
|
542
|
+
def getNamedItem(self, name: str) -> _N | None: ...
|
|
543
|
+
def getNamedItemNS(self, namespaceURI: str | None, localName: str) -> _N | None: ...
|
|
544
|
+
def __getitem__(self, name_or_tuple: str | _NSName) -> _N | None: ...
|
|
545
|
+
def item(self, index: int) -> _N | None: ...
|
|
546
|
+
def removeNamedItem(self, name: str) -> NoReturn: ...
|
|
547
|
+
def removeNamedItemNS(self, namespaceURI: str | None, localName: str) -> NoReturn: ...
|
|
548
|
+
def setNamedItem(self, node: Node) -> NoReturn: ...
|
|
549
|
+
def setNamedItemNS(self, node: Node) -> NoReturn: ...
|
|
310
550
|
@property
|
|
311
551
|
def length(self) -> int:
|
|
312
552
|
"""Number of entries in the NamedNodeMap."""
|
|
@@ -317,38 +557,95 @@ class Identified:
|
|
|
317
557
|
systemId: str | None
|
|
318
558
|
|
|
319
559
|
class DocumentType(Identified, Childless, Node):
|
|
320
|
-
nodeType:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
560
|
+
nodeType: ClassVar[Literal[10]]
|
|
561
|
+
nodeName: str | None # same as DocumentType.name
|
|
562
|
+
nodeValue: None
|
|
563
|
+
attributes: None
|
|
564
|
+
|
|
565
|
+
parentNode: Document | None
|
|
566
|
+
nextSibling: _DocumentChildren | None
|
|
567
|
+
previousSibling: _DocumentChildren | None
|
|
568
|
+
childNodes: EmptyNodeList
|
|
569
|
+
@property
|
|
570
|
+
def firstChild(self) -> None: ...
|
|
571
|
+
@property
|
|
572
|
+
def lastChild(self) -> None: ...
|
|
573
|
+
|
|
574
|
+
namespaceURI: None
|
|
575
|
+
prefix: None
|
|
576
|
+
@property
|
|
577
|
+
def localName(self) -> None:
|
|
578
|
+
"""Namespace-local name of this node."""
|
|
579
|
+
...
|
|
580
|
+
|
|
581
|
+
name: str | None
|
|
582
|
+
internalSubset: str | None
|
|
583
|
+
entities: ReadOnlySequentialNamedNodeMap[Entity]
|
|
584
|
+
notations: ReadOnlySequentialNamedNodeMap[Notation]
|
|
585
|
+
|
|
586
|
+
def __init__(self, qualifiedName: str | None) -> None: ...
|
|
587
|
+
def cloneNode(self, deep: bool) -> DocumentType | None: ...
|
|
329
588
|
def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ...
|
|
330
589
|
|
|
331
590
|
class Entity(Identified, Node):
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
nodeValue:
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
childNodes:
|
|
341
|
-
|
|
342
|
-
def
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
591
|
+
nodeType: ClassVar[Literal[6]]
|
|
592
|
+
nodeName: str # entity name
|
|
593
|
+
nodeValue: None
|
|
594
|
+
attributes: None
|
|
595
|
+
|
|
596
|
+
parentNode: None
|
|
597
|
+
nextSibling: None
|
|
598
|
+
previousSibling: None
|
|
599
|
+
childNodes: NodeList[_EntityChildren]
|
|
600
|
+
@property
|
|
601
|
+
def firstChild(self) -> _EntityChildren | None:
|
|
602
|
+
"""First child node, or None."""
|
|
603
|
+
...
|
|
604
|
+
@property
|
|
605
|
+
def lastChild(self) -> _EntityChildren | None:
|
|
606
|
+
"""Last child node, or None."""
|
|
607
|
+
...
|
|
608
|
+
|
|
609
|
+
namespaceURI: None
|
|
610
|
+
prefix: None
|
|
611
|
+
@property
|
|
612
|
+
def localName(self) -> None:
|
|
613
|
+
"""Namespace-local name of this node."""
|
|
614
|
+
...
|
|
615
|
+
|
|
616
|
+
actualEncoding: str | None
|
|
617
|
+
encoding: str | None
|
|
618
|
+
version: str | None
|
|
619
|
+
notationName: str | None
|
|
620
|
+
|
|
621
|
+
def __init__(self, name: str, publicId: str | None, systemId: str | None, notation: str | None) -> None: ...
|
|
622
|
+
def appendChild(self, newChild: _EntityChildren) -> NoReturn: ... # type: ignore[override]
|
|
623
|
+
def insertBefore(self, newChild: _EntityChildren, refChild: _EntityChildren | None) -> NoReturn: ... # type: ignore[override]
|
|
624
|
+
def removeChild(self, oldChild: _EntityChildren) -> NoReturn: ... # type: ignore[override]
|
|
625
|
+
def replaceChild(self, newChild: _EntityChildren, oldChild: _EntityChildren) -> NoReturn: ... # type: ignore[override]
|
|
346
626
|
|
|
347
627
|
class Notation(Identified, Childless, Node):
|
|
348
|
-
nodeType:
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
628
|
+
nodeType: ClassVar[Literal[12]]
|
|
629
|
+
nodeName: str # notation name
|
|
630
|
+
nodeValue: None
|
|
631
|
+
attributes: None
|
|
632
|
+
|
|
633
|
+
parentNode: DocumentFragment | None
|
|
634
|
+
nextSibling: _DocumentFragmentChildren | None
|
|
635
|
+
previousSibling: _DocumentFragmentChildren | None
|
|
636
|
+
childNodes: EmptyNodeList
|
|
637
|
+
@property
|
|
638
|
+
def firstChild(self) -> None: ...
|
|
639
|
+
@property
|
|
640
|
+
def lastChild(self) -> None: ...
|
|
641
|
+
|
|
642
|
+
namespaceURI: None
|
|
643
|
+
prefix: None
|
|
644
|
+
@property
|
|
645
|
+
def localName(self) -> None:
|
|
646
|
+
"""Namespace-local name of this node."""
|
|
647
|
+
...
|
|
648
|
+
def __init__(self, name: str, publicId: str | None, systemId: str | None) -> None: ...
|
|
352
649
|
|
|
353
650
|
class DOMImplementation(DOMImplementationLS):
|
|
354
651
|
def hasFeature(self, feature: str, version: str | None) -> bool: ...
|
|
@@ -357,53 +654,73 @@ class DOMImplementation(DOMImplementationLS):
|
|
|
357
654
|
def getInterface(self, feature: str) -> Self | None: ...
|
|
358
655
|
|
|
359
656
|
class ElementInfo:
|
|
360
|
-
tagName:
|
|
361
|
-
def __init__(self, name) -> None: ...
|
|
362
|
-
def getAttributeType(self, aname): ...
|
|
363
|
-
def getAttributeTypeNS(self, namespaceURI: str, localName): ...
|
|
364
|
-
def isElementContent(self): ...
|
|
365
|
-
def isEmpty(self): ...
|
|
366
|
-
def isId(self, aname): ...
|
|
367
|
-
def isIdNS(self, namespaceURI: str, localName): ...
|
|
657
|
+
tagName: str
|
|
658
|
+
def __init__(self, name: str) -> None: ...
|
|
659
|
+
def getAttributeType(self, aname: str) -> TypeInfo: ...
|
|
660
|
+
def getAttributeTypeNS(self, namespaceURI: str | None, localName: str) -> TypeInfo: ...
|
|
661
|
+
def isElementContent(self) -> bool: ...
|
|
662
|
+
def isEmpty(self) -> bool: ...
|
|
663
|
+
def isId(self, aname: str) -> bool: ...
|
|
664
|
+
def isIdNS(self, namespaceURI: str | None, localName: str) -> bool: ...
|
|
665
|
+
|
|
666
|
+
_DocumentChildrenPlusFragment = TypeVar("_DocumentChildrenPlusFragment", bound=_DocumentChildren | DocumentFragment)
|
|
368
667
|
|
|
369
668
|
class Document(Node, DocumentLS):
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
parentNode:
|
|
376
|
-
previousSibling:
|
|
377
|
-
nextSibling:
|
|
378
|
-
|
|
669
|
+
nodeType: ClassVar[Literal[9]]
|
|
670
|
+
nodeName: Literal["#document"]
|
|
671
|
+
nodeValue: None
|
|
672
|
+
attributes: None
|
|
673
|
+
|
|
674
|
+
parentNode: None
|
|
675
|
+
previousSibling: None
|
|
676
|
+
nextSibling: None
|
|
677
|
+
childNodes: NodeList[_DocumentChildren]
|
|
678
|
+
@property
|
|
679
|
+
def firstChild(self) -> _DocumentChildren | None:
|
|
680
|
+
"""First child node, or None."""
|
|
681
|
+
...
|
|
682
|
+
@property
|
|
683
|
+
def lastChild(self) -> _DocumentChildren | None:
|
|
684
|
+
"""Last child node, or None."""
|
|
685
|
+
...
|
|
686
|
+
|
|
687
|
+
namespaceURI: None
|
|
688
|
+
prefix: None
|
|
689
|
+
@property
|
|
690
|
+
def localName(self) -> None:
|
|
691
|
+
"""Namespace-local name of this node."""
|
|
692
|
+
...
|
|
693
|
+
|
|
694
|
+
implementation: DOMImplementation
|
|
695
|
+
actualEncoding: str | None
|
|
379
696
|
encoding: str | None
|
|
380
697
|
standalone: bool | None
|
|
381
|
-
version:
|
|
698
|
+
version: str | None
|
|
382
699
|
strictErrorChecking: bool
|
|
383
|
-
errorHandler:
|
|
384
|
-
documentURI:
|
|
700
|
+
errorHandler: _DOMErrorHandler | None
|
|
701
|
+
documentURI: str | None
|
|
385
702
|
doctype: DocumentType | None
|
|
386
|
-
|
|
703
|
+
documentElement: Element | None
|
|
704
|
+
|
|
387
705
|
def __init__(self) -> None: ...
|
|
388
|
-
def appendChild(self, node:
|
|
389
|
-
|
|
390
|
-
def removeChild(self, oldChild): ...
|
|
706
|
+
def appendChild(self, node: _DocumentChildrenVar) -> _DocumentChildrenVar: ... # type: ignore[override]
|
|
707
|
+
def removeChild(self, oldChild: _DocumentChildrenVar) -> _DocumentChildrenVar: ... # type: ignore[override]
|
|
391
708
|
def unlink(self) -> None: ...
|
|
392
|
-
def cloneNode(self, deep): ...
|
|
709
|
+
def cloneNode(self, deep: bool) -> Document | None: ...
|
|
393
710
|
def createDocumentFragment(self) -> DocumentFragment: ...
|
|
394
711
|
def createElement(self, tagName: str) -> Element: ...
|
|
395
712
|
def createTextNode(self, data: str) -> Text: ...
|
|
396
713
|
def createCDATASection(self, data: str) -> CDATASection: ...
|
|
397
714
|
def createComment(self, data: str) -> Comment: ...
|
|
398
|
-
def createProcessingInstruction(self, target, data): ...
|
|
399
|
-
def createAttribute(self, qName) -> Attr: ...
|
|
400
|
-
def createElementNS(self, namespaceURI: str, qualifiedName: str): ...
|
|
401
|
-
def createAttributeNS(self, namespaceURI: str, qualifiedName: str) -> Attr: ...
|
|
715
|
+
def createProcessingInstruction(self, target: str, data: str) -> ProcessingInstruction: ...
|
|
716
|
+
def createAttribute(self, qName: str) -> Attr: ...
|
|
717
|
+
def createElementNS(self, namespaceURI: str | None, qualifiedName: str) -> Element: ...
|
|
718
|
+
def createAttributeNS(self, namespaceURI: str | None, qualifiedName: str) -> Attr: ...
|
|
402
719
|
def getElementById(self, id: str) -> Element | None: ...
|
|
403
720
|
def getElementsByTagName(self, name: str) -> NodeList[Element]: ...
|
|
404
|
-
def getElementsByTagNameNS(self, namespaceURI: str, localName: str) -> NodeList[Element]: ...
|
|
721
|
+
def getElementsByTagNameNS(self, namespaceURI: str | None, localName: str) -> NodeList[Element]: ...
|
|
405
722
|
def isSupported(self, feature: str, version: str | None) -> bool: ...
|
|
406
|
-
def importNode(self, node, deep): ...
|
|
723
|
+
def importNode(self, node: _ImportableNodeVar, deep: bool) -> _ImportableNodeVar: ...
|
|
407
724
|
if sys.version_info >= (3, 9):
|
|
408
725
|
def writexml(
|
|
409
726
|
self,
|
|
@@ -424,4 +741,18 @@ class Document(Node, DocumentLS):
|
|
|
424
741
|
encoding: Incomplete | None = None,
|
|
425
742
|
) -> None: ...
|
|
426
743
|
|
|
427
|
-
|
|
744
|
+
@overload
|
|
745
|
+
def renameNode(self, n: Element, namespaceURI: str, name: str) -> Element: ...
|
|
746
|
+
@overload
|
|
747
|
+
def renameNode(self, n: Attr, namespaceURI: str, name: str) -> Attr: ...
|
|
748
|
+
@overload
|
|
749
|
+
def renameNode(self, n: Element | Attr, namespaceURI: str, name: str) -> Element | Attr: ...
|
|
750
|
+
def insertBefore(
|
|
751
|
+
self, newChild: _DocumentChildrenPlusFragment, refChild: _DocumentChildren | None # type: ignore[override]
|
|
752
|
+
) -> _DocumentChildrenPlusFragment: ...
|
|
753
|
+
@overload # type: ignore[override]
|
|
754
|
+
def replaceChild(
|
|
755
|
+
self, newChild: DocumentFragment, oldChild: _DocumentChildrenVar
|
|
756
|
+
) -> _DocumentChildrenVar | DocumentFragment: ...
|
|
757
|
+
@overload
|
|
758
|
+
def replaceChild(self, newChild: _DocumentChildren, oldChild: _DocumentChildrenVar) -> _DocumentChildrenVar | None: ...
|