Merge pull request #3622 from sw23/main
Fixing remaining stub mypy issues + run check-stubs to CI
This commit is contained in:
commit
9bf77905e3
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y eatmydata
|
sudo apt-get install -y eatmydata
|
||||||
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
|
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
|
||||||
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli
|
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy
|
||||||
- name: Versions
|
- name: Versions
|
||||||
run: |
|
run: |
|
||||||
gcc --version
|
gcc --version
|
||||||
@ -67,8 +67,8 @@ jobs:
|
|||||||
- name: mpy Tests
|
- name: mpy Tests
|
||||||
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
|
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
|
||||||
working-directory: tests
|
working-directory: tests
|
||||||
- name: Stubs
|
- name: Build and Validate Stubs
|
||||||
run: make stubs -j2
|
run: make check-stubs -j2
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: stubs
|
name: stubs
|
||||||
|
@ -126,7 +126,7 @@ const mp_obj_property_t ipaddress_ipv4address_version_obj = {
|
|||||||
(mp_obj_t)&mp_const_none_obj},
|
(mp_obj_t)&mp_const_none_obj},
|
||||||
};
|
};
|
||||||
|
|
||||||
//| def __eq__(self, other: IPv4Address) -> bool:
|
//| def __eq__(self, other: object) -> bool:
|
||||||
//| """Two Address objects are equal if their addresses and address types are equal."""
|
//| """Two Address objects are equal if their addresses and address types are equal."""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
|
@ -49,7 +49,14 @@ STATIC const mp_obj_type_t socket_type;
|
|||||||
|
|
||||||
//| class socket:
|
//| class socket:
|
||||||
//|
|
//|
|
||||||
//| def __init__(self, family: int, type: int, proto: int) -> None:
|
//| AF_INET: int
|
||||||
|
//| AF_INET6: int
|
||||||
|
//| SOCK_STREAM: int
|
||||||
|
//| SOCK_DGRAM: int
|
||||||
|
//| SOCK_RAW: int
|
||||||
|
//| IPPROTO_TCP: int
|
||||||
|
//|
|
||||||
|
//| def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None:
|
||||||
//| """Create a new socket
|
//| """Create a new socket
|
||||||
//|
|
//|
|
||||||
//| :param int family: AF_INET or AF_INET6
|
//| :param int family: AF_INET or AF_INET6
|
||||||
@ -57,12 +64,6 @@ STATIC const mp_obj_type_t socket_type;
|
|||||||
//| :param int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)"""
|
//| :param int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)"""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
//| AF_INET: int
|
|
||||||
//| AF_INET6: int
|
|
||||||
//| SOCK_STREAM: int
|
|
||||||
//| SOCK_DGRAM: int
|
|
||||||
//| SOCK_RAW: int
|
|
||||||
//|
|
|
||||||
|
|
||||||
STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
|
STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
|
||||||
mp_arg_check_num(n_args, kw_args, 0, 4, false);
|
mp_arg_check_num(n_args, kw_args, 0, 4, false);
|
||||||
|
@ -57,8 +57,14 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t
|
|||||||
return MP_OBJ_FROM_PTR(s);
|
return MP_OBJ_FROM_PTR(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//| AF_INET: int
|
||||||
//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None:
|
//| AF_INET6: int
|
||||||
|
//| SOCK_STREAM: int
|
||||||
|
//| SOCK_DGRAM: int
|
||||||
|
//| SOCK_RAW: int
|
||||||
|
//| IPPROTO_TCP: int
|
||||||
|
//|
|
||||||
|
//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> socketpool.Socket:
|
||||||
//| """Create a new socket
|
//| """Create a new socket
|
||||||
//|
|
//|
|
||||||
//| :param ~int family: AF_INET or AF_INET6
|
//| :param ~int family: AF_INET or AF_INET6
|
||||||
@ -66,6 +72,7 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t
|
|||||||
//| :param ~int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)"""
|
//| :param ~int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)"""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
|
|
||||||
STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
mp_arg_check_num(n_args, kw_args, 0, 5, false);
|
mp_arg_check_num(n_args, kw_args, 0, 5, false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user