Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/struct #40

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading