Skip to content

Commit

Permalink
New distribution [0.1.3]
Browse files Browse the repository at this point in the history
 * minor bugfix in function processing (function with return type annotation)
  • Loading branch information
JarryShaw committed Mar 9, 2020
1 parent 2eae221 commit 92da948
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 77 deletions.
120 changes: 60 additions & 60 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions share/walrus.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH WALRUS 1 "December 11, 2019" "v0.1.3" ""
.TH WALRUS 1 "March 09, 2020" "v0.1.3" ""
.SH NAME
walrus \- back-port compiler for Python 3.8 assignment expression
.
Expand Down Expand Up @@ -66,7 +66,7 @@ run in quiet mode
duplicate original files in case there\(aqs any issue
.INDENT 0.0
.TP
.BI \-n\fB a\fP,\fB \ \-\-no\-archive
.BI \-n\fB a\fR,\fB \ \-\-no\-archive
do not archive original files
.UNINDENT
.INDENT 0.0
Expand All @@ -90,7 +90,7 @@ line separator to process source files
.UNINDENT
.INDENT 0.0
.TP
.BI \-n\fB l\fP,\fB \ \-\-no\-linting
.BI \-n\fB l\fR,\fB \ \-\-no\-linting
do not lint converted codes
.UNINDENT
.INDENT 0.0
Expand Down
2 changes: 1 addition & 1 deletion share/walrus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ back-port compiler for Python 3.8 assignment expression
-------------------------------------------------------

:Version: v0.1.3
:Date: December 11, 2019
:Date: March 09, 2020
:Manual section: 1
:Author:
Jarry Shaw, a newbie programmer, is the author, owner and maintainer
Expand Down
17 changes: 4 additions & 13 deletions walrus.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,19 +452,10 @@ def _process_funcdef(self, node):
- `node` -- `parso.python.tree.Function`, function node
"""
# 'def' NAME '(' PARAM ')' ':' SUITE
func_def, func_name, func_param, func_op, func_suite = node.children

# <Keyword: def>
self._process(func_def)
# <Name: ...>
self._process(func_name)
# PythonNode(parameters, [...])
self._process(func_param)
# <Operator: :>
self._process(func_op)
# suite
self._process_suite_node(func_suite, func=True)
# 'def' NAME '(' PARAM ')' [ '->' NAME ] ':' SUITE
for child in node.children[:-1]:
self._process(child)
self._process_suite_node(node.children[-1], func=True)

def _process_lambdef(self, node):
"""Process lambda definition (``lambdef``).
Expand Down

0 comments on commit 92da948

Please sign in to comment.