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

Add missing methods #464

Closed
wants to merge 14 commits into from
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install:
- pip install .
script:
- "./tests/mypy_test.py -p 3.6 3.7"
- pip3 install pandas numpy --upgrade
- MYPY_TEST_PREFIX=$PWD MYPYPATH=$PWD/third_party/3 pytest
- MYPYPATH=$PWD/third_party/3 mypy spark-source/examples/src/main/python/ml spark-source/examples/src/main/python/sql spark-source/examples/src/main/python/sql/streaming
- black --check $PWD/third_party/3/pyspark
Expand Down
4 changes: 2 additions & 2 deletions third_party/3/pyspark/accumulators.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# under the License

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

import socketserver.BaseRequestHandler # type: ignore

Expand Down
4 changes: 3 additions & 1 deletion third_party/3/pyspark/serializers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
# specific language governing permissions and limitations
# under the License.

from typing import Any
from typing import Any, Dict

__cls: Dict

class SpecialLengths:
END_OF_DATA_SECTION: int = ...
Expand Down
9 changes: 7 additions & 2 deletions third_party/3/pyspark/util.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,25 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

from typing import Any, Tuple
from typing import Any, Tuple, List
from pyspark._typing import F

import threading

__all__: List[str]

def print_exec(stream: Any) -> None: ...

class VersionUtils:
@staticmethod
def majorMinorVersion(sparkVersion: str) -> Tuple[int, int]: ...

def fail_on_stopiteration(f: F) -> F: ...
def _parse_memory(s: str) -> int: ...
def _print_missing_jar(
lib_name: str, pkg_name: str, jar_name: str, spark_version: str
) -> None: ...

class InheritableThread(threading.Thread):
def __init__(self, target: Any, *args: Any, **kwargs: Any): ...
Expand Down