Skip to content

Commit

Permalink
(remove extra lines)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianToepfer committed Nov 30, 2022
1 parent 189999c commit 16bc2c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ tests/out/
tests/build/
/.tox
pyrobuf/src/pyrobuf_defs.pxi
.pytest_cache
.mypy_cache
.pytest_cache
5 changes: 2 additions & 3 deletions pyrobuf/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import sys
from setuptools import setup
from distutils.sysconfig import get_python_lib

from Cython.Build import cythonize
from pathlib import Path
Expand All @@ -18,6 +17,7 @@

_VM = sys.version_info.major


class Compiler(object):

_env = Environment(loader=PackageLoader('pyrobuf.protobuf', 'templates'))
Expand Down Expand Up @@ -137,7 +137,6 @@ def _generate(self, filename):
self._messages.append(msg_def)

for f in msg_def['imports']:

print("parsing dependency '{}'".format(f))
depends = None

Expand All @@ -150,7 +149,7 @@ def _generate(self, filename):
self._generate(depends)
except FileNotFoundError:
raise FileNotFoundError("can't find message spec for '{}'"
.format(f))
.format(f))

if self.package is None:
self._write(name, msg_def)
Expand Down
2 changes: 1 addition & 1 deletion pyrobuf/protobuf/templates/proto_pyx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import enum
from pyrogen.{{ import }}_proto cimport *
{%- endfor %}


{%- macro enum_fields_def(enum) %}
class {{enum.full_name}}(enum.IntEnum):
{%- for field in enum.fields.values() %}
Expand All @@ -23,6 +22,7 @@ class {{enum.full_name}}(enum.IntEnum):

{%- macro classdef(message) %}
cdef class {{ message.full_name }}:

def __cinit__(self):
self._listener = noop_listener

Expand Down

0 comments on commit 16bc2c1

Please sign in to comment.