Skip to content

Commit

Permalink
organize protobuf files (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Pollack authored Apr 12, 2020
1 parent 60f50b5 commit 8984f7f
Show file tree
Hide file tree
Showing 29 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions presidio-analyzer/presidio_analyzer/__main__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pylint: disable=wrong-import-position,wrong-import-order
import logging
import grpc
import analyze_pb2
import analyze_pb2_grpc
from protobuf_models import analyze_pb2
from protobuf_models import analyze_pb2_grpc
from concurrent import futures
import os
import sys
Expand Down
6 changes: 3 additions & 3 deletions presidio-analyzer/presidio_analyzer/analyzer_engine.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
import uuid

import analyze_pb2
import analyze_pb2_grpc
import common_pb2
from protobuf_models import analyze_pb2
from protobuf_models import analyze_pb2_grpc
from protobuf_models import common_pb2

from presidio_analyzer import PresidioLogger
from presidio_analyzer.app_tracer import AppTracer
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).parent))
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os

import grpc
import recognizers_store_pb2
import recognizers_store_pb2_grpc
from protobuf_models import recognizers_store_pb2
from protobuf_models import recognizers_store_pb2_grpc

from presidio_analyzer import PatternRecognizer
from presidio_analyzer import Pattern
Expand Down
6 changes: 3 additions & 3 deletions presidio-analyzer/tests/test_analyzer_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from presidio_analyzer import AnalyzerEngine, PatternRecognizer, Pattern, \
RecognizerResult, RecognizerRegistry, AnalysisExplanation
from presidio_analyzer import PresidioLogger
from presidio_analyzer.analyze_pb2 import AnalyzeRequest
from presidio_analyzer.analyze_pb2 import RecognizersAllRequest
from presidio_analyzer.protobuf_models.analyze_pb2 import AnalyzeRequest, \
RecognizersAllRequest
from presidio_analyzer.entity_recognizer import EntityRecognizer
from presidio_analyzer.nlp_engine import NlpArtifacts
from presidio_analyzer.predefined_recognizers import CreditCardRecognizer, \
Expand Down Expand Up @@ -561,4 +561,4 @@ def test_get_recognizers_returns_supported_language(self):
request = RecognizersAllRequest(language="ru")
response = analyze_engine.GetAllRecognizers(request, None)
# there is only 1 mocked russian recognizer
assert len(response) == 1
assert len(response) == 1

0 comments on commit 8984f7f

Please sign in to comment.