Skip to content

Commit

Permalink
fix: rename extras_require from 'example' to 'full' (#44)
Browse files Browse the repository at this point in the history
* fix: rename extras_require from 'example' to 'full'

* fix: remove unused method 'row2dict'

Co-authored-by: chenweibin <[email protected]>
  • Loading branch information
Ccapton and chenweibin authored Jan 27, 2021
1 parent 5bbf269 commit 332c19e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python3 -m venv env
```
Install packages for `examples`
```shell script
pip install -e ".[examples]"
pip install "flask-state[full]"
```

### Install Redis
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
extras_require={
"test": ["pytest", "redis"],
"dev": ["black", "codespell", "flake8", "isort", "pip-tools", "pre-commit", "setuptools", "twine", "wheel"],
"example": ["redis"],
"full": ["redis"],
},
)
13 changes: 0 additions & 13 deletions src/flask_state/services/host_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,3 @@ def control_result_counts(result) -> list:
index += interval
result = refine_result
return result


def row2dict(field):
"""
Model class to dictionary class
:param field: database query results
:return: database query results dictionary
"""
d = {}
for column in field.__table__.columns:
if column.name not in ("create_time", "update_time"):
d[column.name] = getattr(field, column.name)
return d

0 comments on commit 332c19e

Please sign in to comment.