Skip to content

Commit

Permalink
fix Index type arg, update todo and tests.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanderhoof committed May 22, 2022
1 parent c6b44fd commit e115ae9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
13 changes: 1 addition & 12 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
* - Creating dbml schema in python
* - pyparsing new var names (+possibly new features)
* - enum type
* - `_type` -> `type`
* - expression class
- schema.add and .delete to support multiple arguments (handle errors properly)
* - 2.3.1 Multiline comment /* ... */
* - 2.4 Multiple Schemas
* - validation on "add_index", "add_table" etc
* - enum type in table definition with schema
- table columns parameter
- add coverage badge
- add docstrings
- new docs
- comment class
- add CI
2 changes: 1 addition & 1 deletion pydbml/classes/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self,
subjects: List[Union[str, 'Column', 'Expression']],
name: Optional[str] = None,
unique: bool = False,
type: Literal['hash', 'btree'] = None,
type: Optional[Literal['hash', 'btree']] = None,
pk: bool = False,
note: Optional[Union['Note', str]] = None,
comment: Optional[str] = None):
Expand Down
2 changes: 1 addition & 1 deletion pydbml/parser/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class IndexBlueprint(Blueprint):
subject_names: List[Union[str, ExpressionBlueprint]]
name: Optional[str] = None
unique: bool = False
type: Optional[str] = None
type: Optional[Literal['hash', 'btree']] = None
pk: bool = False
note: Optional[NoteBlueprint] = None
comment: Optional[str] = None
Expand Down
3 changes: 3 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
python3 -m doctest README.md &&\
python3 -m doctest docs/classes.md &&\
python3 -m doctest docs/upgrading.md &&\
python3 -m doctest docs/creating_schema.md &&\
python3 -m unittest discover &&\
mypy pydbml --ignore-missing-imports

0 comments on commit e115ae9

Please sign in to comment.