mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
generate type stubs for Protobuf; disable pylint on rsbridge
This commit is contained in:
parent
b54c127372
commit
280b010493
4 changed files with 7 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,7 +10,7 @@
|
|||
.pytype
|
||||
__pycache__
|
||||
anki/buildhash.py
|
||||
anki/bridge_pb2.py
|
||||
anki/bridge_pb2.*
|
||||
aqt/forms
|
||||
locale
|
||||
rs/ankirs/src/proto.rs
|
||||
|
|
2
Makefile
2
Makefile
|
@ -130,7 +130,7 @@ BUILDDEPS := .build/ui .build/js .build/rs .build/py-proto
|
|||
@touch $@
|
||||
|
||||
.build/py-proto: $(RUNREQS) $(PROTODEPS)
|
||||
protoc --proto_path=proto --python_out=anki proto/bridge.proto
|
||||
protoc --proto_path=proto --python_out=anki --mypy_out=anki proto/bridge.proto
|
||||
@touch $@
|
||||
|
||||
.PHONY: build clean
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# pylint: skip-file
|
||||
|
||||
from typing import Dict, List
|
||||
|
||||
import _ankirs # pytype: disable=import-error
|
||||
|
@ -66,4 +68,5 @@ class RSBridge:
|
|||
)
|
||||
)
|
||||
output = self._run_command(input).template_requirements
|
||||
return proto_template_reqs_to_legacy(output.requirements)
|
||||
reqs: List[pb.TemplateRequirement] = output.requirements # type: ignore
|
||||
return proto_template_reqs_to_legacy(reqs)
|
||||
|
|
|
@ -6,3 +6,4 @@ git+https://github.com/dae/isort#egg=isort
|
|||
# fixme: when pylint supports isort 5.0, switch to pypy
|
||||
git+https://github.com/dae/pylint#egg=pylint
|
||||
black
|
||||
mypy_protobuf
|
Loading…
Reference in a new issue