Skip to content

Commit

Permalink
feat:spaces after parentheses; formatting
Browse files Browse the repository at this point in the history
resolves #26
  • Loading branch information
Byung authored and Byung committed Nov 9, 2022
1 parent d74127a commit 5201dc3
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 155 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Example:
```python3
>>> from daidepp import AND, PRP, PCE
>>> str(AND(PRP(PCE("AUS")), PRP(PCE("AUS", "ENG"))))
`AND ((PRP (PCE (AUS))) (PRP (PCE (AUS ENG))) (PRP (PCE (AUS ENG FRA))))`
```
`AND ( ( PRP ( PCE ( AUS ) ) ) ( PRP ( PCE ( AUS ENG ) ) ) ( PRP ( PCE ( AUS ENG FRA ) ) ) )`
```
Each class in `keywords.py` uses different parameters for instantiation, so it is recommended to carefully follow the type hints or checkout `tests/test_keywords.py`, which provices examples for each class.

## Pull Requests
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = daidepp
version = 0.1.0
version = 0.2.0
author = Byung Oh
author_email = [email protected]
description = "DAIDE Parser"
Expand Down
3 changes: 1 addition & 2 deletions src/daidepp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from daidepp.daide_visitor import daide_visitor
from daidepp.grammar import create_daide_grammar

from daidepp.keywords import *
from daidepp.keywords import *
2 changes: 1 addition & 1 deletion src/daidepp/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Literal
from typing_extensions import Literal

POWER = Literal["AUS", "ENG", "FRA", "GER", "ITA", "RUS", "TUR"]
UNIT_TYPE = Literal["AMY", "FLT"]
Expand Down
2 changes: 2 additions & 0 deletions src/daidepp/daide_visitor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from parsimonious.nodes import Node, NodeVisitor

from daidepp.keywords import *


class DAIDEVisitor(NodeVisitor):
def visit_message(self, node, visited_children):
Expand Down
Loading

0 comments on commit 5201dc3

Please sign in to comment.