Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Add annotations for registries
Browse files Browse the repository at this point in the history
- `pyspark.accumulators._accumulatorRegistry`
- `pyspark.broadcast._broadcastRegistry`
  • Loading branch information
Fokko authored and zero323 committed Sep 26, 2020
1 parent 5281594 commit aab8844
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion third_party/3/pyspark/accumulators.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.

from typing import Callable, Generic, Tuple, Type, TypeVar
from typing import Callable, Generic, Tuple, Type, TypeVar, Dict

import socketserver.BaseRequestHandler # type: ignore

Expand All @@ -27,6 +27,8 @@ U = TypeVar("U", bound=SupportsIAdd)

import socketserver as SocketServer

accumulatorRegistry: Dict[int, Accumulator]

class Accumulator(Generic[T]):
aid: int
accum_param: AccumulatorParam[T]
Expand Down
4 changes: 3 additions & 1 deletion third_party/3/pyspark/broadcast.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
# under the License.

import threading
from typing import Any, Generic, Optional, TypeVar
from typing import Any, Generic, Optional, TypeVar, Dict

T = TypeVar("T")

_broadcastRegistry: Dict[int, Broadcast]

class Broadcast(Generic[T]):
def __init__(
self,
Expand Down

0 comments on commit aab8844

Please sign in to comment.