Skip to content

Commit

Permalink
Merge pull request #40 from benber86/fix/struct
Browse files Browse the repository at this point in the history
Fix/struct
  • Loading branch information
benber86 authored Aug 29, 2024
2 parents 998d8dd + d7a3f35 commit 690a6f6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build-backend = "setuptools.build_meta"

[tool.poetry]
name = "mamushi"
version = "0.0.4-a1"
version = "0.0.4-a2"
description = "Vyper Formatter"
authors = ["benny <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.4-a1
current_version = 0.0.4-a2
commit = False
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion src/mamushi/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.4-a1"
__version__ = "0.0.4-a2"
2 changes: 1 addition & 1 deletion src/mamushi/formatting/whitespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def whitespace(leaf: Leaf) -> str:
):
# no parentheses on calls, function sigs, logs and defs
# except for returns
if t == tokens.LPAR and prev.type not in tokens.RETURN_TYPE:
if t == tokens.LPAR and prev.type not in {tokens.RETURN_TYPE}:
return NO

if t == tokens.LSQB:
Expand Down
4 changes: 2 additions & 2 deletions src/mamushi/parsing/grammar.lark
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module: ( DOCSTRING
| transient_def
| implements_def
| uses_def
| exports_def
| export
| initializes_stmt
| function_def
| immutable_def
Expand Down Expand Up @@ -122,7 +122,7 @@ interface_def: _INTERFACE_DECL NAME ":" _NEWLINE _INDENT ( interface_function _N

implements_def: "implements" ":" NAME
uses_def: "uses" ":" NAME
exports_def: "exports" ":" (attribute | tuple)
export: "exports" ":" (attribute | "(" attribute ")"| tuple)

_INITIALIZES_DECL: "initializes"
initializes_stmt: _INITIALIZES_DECL ":" initializes_list
Expand Down
4 changes: 2 additions & 2 deletions src/mamushi/parsing/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
INTERFACE_DEF = "interface_def"
IMPLEMENTS_DEF = "implements_def"
USES_DEF = "uses_def"
EXPORTS_DEF = "exports_def"
EXPORT = "export"
STRUCT_DEF = "struct_def"
ENUM_DEF = "enum_def"
EVENT_DEF = "event_def"
Expand All @@ -205,7 +205,7 @@
INITIALIZES_STMT,
IMPLEMENTS_DEF,
USES_DEF,
EXPORTS_DEF,
EXPORT,
CONSTANT_DEF,
IMMUTABLE_DEF,
INTERFACE_DEF,
Expand Down

0 comments on commit 690a6f6

Please sign in to comment.