Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
5bc11d55
Commit
5bc11d55
authored
7 years ago
by
Mehrdad Afshari
Browse files
Options
Downloads
Patches
Plain Diff
Expand pylint to grpc_health and grpc_reflection
parent
ec21e993
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
+2
-3
2 additions, 3 deletions
...n/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
tools/distrib/pylint_code.sh
+9
-5
9 additions, 5 deletions
tools/distrib/pylint_code.sh
with
11 additions
and
8 deletions
src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
+
2
−
3
View file @
5bc11d55
...
...
@@ -28,8 +28,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
Reference implementation for reflection in gRPC Python.
"""
import
threading
import
grpc
from
google.protobuf
import
descriptor_pb2
from
google.protobuf
import
descriptor_pool
...
...
@@ -120,6 +118,7 @@ class ReflectionServicer(reflection_pb2_grpc.ServerReflectionServicer):
]))
def
ServerReflectionInfo
(
self
,
request_iterator
,
context
):
# pylint: disable=unused-argument
for
request
in
request_iterator
:
if
request
.
HasField
(
'
file_by_filename
'
):
yield
self
.
_file_by_filename
(
request
.
file_by_filename
)
...
...
@@ -152,4 +151,4 @@ def enable_server_reflection(service_names, server, pool=None):
pool: DescriptorPool object to use (descriptor_pool.Default() if None).
"""
reflection_pb2_grpc
.
add_ServerReflectionServicer_to_server
(
ReflectionServicer
(
service_names
,
pool
),
server
)
ReflectionServicer
(
service_names
,
pool
=
pool
),
server
)
This diff is collapsed.
Click to expand it.
tools/distrib/pylint_code.sh
+
9
−
5
View file @
5bc11d55
...
...
@@ -31,18 +31,22 @@
set
-ex
# change to root directory
cd
$(
dirname
$0
)
/../..
cd
"
$(
dirname
"
$0
"
)
/../..
"
DIRS
=
src/python/grpcio/grpc
DIRS
=(
'src/python/grpcio/grpc'
'src/python/grpcio_reflection/grpc_reflection'
'src/python/grpcio_health_checking/grpc_health'
)
VIRTUALENV
=
python_pylint_venv
virtualenv
$VIRTUALENV
PYTHON
=
`
realpath
$VIRTUALENV
/bin/python
`
PYTHON
=
$(
realpath
$VIRTUALENV
/bin/python
)
$PYTHON
-m
pip
install
pylint
==
1.6.5
for
dir
in
$
DIRS
;
do
$PYTHON
-m
pylint
--rcfile
=
.pylintrc
-rn
$dir
||
exit
$?
for
dir
in
"
${
DIRS
[@]
}
"
;
do
$PYTHON
-m
pylint
--rcfile
=
.pylintrc
-rn
"
$dir
"
||
exit
$?
done
exit
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment