Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mezantrop committed Jul 2, 2024
1 parent 8b189ad commit ca83993
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CHANGELOG

* **2024.07.02 tSQLike-1.1.0**
* Import methods use `detect_types` to detect if autoconversion from `str` to `int`, `float` and `bool` is needed
* Import methods use `detect_types` to detect if auto-conversion from `str` to `int`, `float` and `bool` is needed

* **2024.06.28 tSQLike-1.0.4**
* `select_lt()` respects empty arguments
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Description

**tSQLike** is a Python3 module that is written with a hope to make tabular data process easier using SQL-like primitives.
**tSQLike** is a `Python3` module that is written with a hope to make tabular data process easier using SQL-like primitives.

## Usage

Expand Down Expand Up @@ -100,14 +100,14 @@ Controls what arguments are available to `eval()` function

### Standalone functions

| Name | Status | Description |
|--------------|---------|----------------------------------------------------------|
| `open_file` | ☑ | Open a file |
| `close_file` | ☑ | Close a file |
| `read_json` | ☑ | Read `JSON` file |
| `read_csv` | ☑ | Read `CSV` file |
| `read_xml` | ☐ | Read `XML`. NB: Do we need XML support? |
| `to_type` | ☑ | Convert a string to a proper type: int, float or boolean |
| Name | Status | Description |
|--------------|---------|------------------------------------------------------------|
| `open_file` | ☑ | Open a file |
| `close_file` | ☑ | Close a file |
| `read_json` | ☑ | Read `JSON` file |
| `read_csv` | ☑ | Read `CSV` file |
| `read_xml` | ☐ | Read `XML`. NB: Do we need XML support? |
| `to_type` | ☑ | Convert a `str` to a proper type: `int`, `float` or `bool` |

#### WARNING

Expand Down
3 changes: 2 additions & 1 deletion tsqlike/tsqlike.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ def import_list_dicts(self, data, name=None, detect_types=False):
self.header = [self.name + TNAME_COLUMN_DELIMITER + str(f)
if TNAME_COLUMN_DELIMITER not in str(f) else f for f in (data[0].keys())]

self.table = [list(r.values()) for r in data] if not detect_types else [[to_type(v) for v in r.values()] for r in data]
self.table = [list(r.values()) for r in data] if not detect_types else [
[to_type(v) for v in r.values()] for r in data]

else:
raise ValueError('[email protected]_list_dicts: Unexpected data format')
Expand Down

0 comments on commit ca83993

Please sign in to comment.