Minor non-functional changes

- fix few typos
- remove unused imports
- fix minor code-quality issues
- replace `grpclib._protocols` with `grpclib._typing`
- fix boolean and None assertions in test cases
This commit is contained in:
Arun Babu Neelicattu
2020-07-07 19:06:43 +02:00
parent 586e28d2dc
commit 0f3ad25770
10 changed files with 57 additions and 61 deletions

View File

@@ -77,7 +77,7 @@ def get_py_zero(type_num: int) -> Union[str, float]:
def traverse(proto_file):
def _traverse(path, items, prefix=""):
for i, item in enumerate(items):
# Adjust the name since we flatten the heirarchy.
# Adjust the name since we flatten the hierarchy.
item.name = next_prefix = prefix + item.name
yield item, path + [i]
@@ -355,7 +355,7 @@ def generate_code(request, response):
# Render and then format the output file.
f.content = black.format_str(
template.render(description=output),
mode=black.FileMode(target_versions=set([black.TargetVersion.PY37])),
mode=black.FileMode(target_versions={black.TargetVersion.PY37}),
)
# Make each output directory a package with __init__ file