Upgrade to main branch#16
Open
RaSan147 wants to merge 136 commits intoRaSan147:masterfrom
Open
Conversation
This code: ``` import numpy as np from tabulate import tabulate data = [[np.ones(1)]] print(tabulate(data)) ``` Throws a `FutureWarning` or a `ValueError` due to the comparison with `SEPARATING_LINE`. Fixes #287
Fix separating line with dataclasses
Fix separating line detection with ndarray values
fix(docs): Correct typo in ANSI support section
Fix multiline support for github format
Fix handling "True"/"False" bool str and None
Configure break long words and on hyphen for maxcolwidths
Declare licenses using only these two fields, as per PEP 639: * license: SPDX license expression consisting of one or more license identifiers * license-files: list of license file glob patterns Supported by setuptools ≥ 77.0, or perhaps setuptools ≥ 77.0.3 which irons out some bugs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files
- If the object implements a custom `__getattr__`, or if its `__call__` is itself not callable, you may get misleading results. - Instead use the built-in `callable` function. Not only is it more robust, but it makes the intent clear and the code more readable.
Fixes #256.
When a column contains both bool-like strings ('True'/'False') and
numeric strings, the column type is detected as float. Formatting then
crashes with ValueError on float('False').
Catch ValueError and TypeError in the float branch of _format and fall
back to string formatting.
Fixes #209
Fix column wrapping breaking with None values (fixes #312)
…2.0. Use the 'S' alias instead."
Unnecessary list comprehension
Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead
… optional escape_map generalize LaTeX escaping function, move escaping to _build_simple_row
The build backend should be `flit_core`, not `flit`: https://flit.pypa.io/en/stable/pyproject_toml.html#build-system-section File `_version.py` should be part of sdist and wheel distributions.
It's `_version.py`, not `version.py` any more.
Either support Python 3.8 and 3.9 officially and keep testing these versions, or stop testing. This grey area where you don't support versions but still test them just in case doesn't help. For example, ruff targets `requires-python` and generates code that may not be compatible with earlier versions. Such code will break CI tests with unsupported versions of Python.
The resulting code is faster, simpler and more readable.
Either support Python 3.8 and 3.9 officially and keep testing these versions, or stop testing. This grey area where you don't support versions but still test them just in case doesn't help. For example, ruff targets `requires-python` and generates code that may not be compatible with earlier versions. Such code will break CI tests with unsupported versions of Python.
GH102: Auto-cancel on repeated PRs GH103: At least one workflow with manual dispatch trigger
fix #173 New CLI parameter: --headers HEADERS where HEADERS can be "firstrow", "keys", "HEADER1,HEADER2,...", "KEY1:HEADER1,KEY2:HEADER2,..." --read FILEFORMAT where FILEFORMAT can be "rsv" (default), "csv", "jsonl" Deprecated CLI parameter: --header Usage examples: cat ./examples/people.csv | tabulate -r csv --headers firstrow id name email "favorite" fruit ---- ------ ----------------- ------------------ 1 Alice alice@example.com apple, kiwi 2 Bob bob@example.com banana, orange, lychee 3 Carol pear cat ./examples/people.jsonl | tabulate -r jsonl -f grid --headers 'id:ID,name:First Name,email:Email' +------+--------------+-------------------+ | ID | First Name | Email | +======+==============+===================+ | 1 | Alice | alice@example.com | +------+--------------+-------------------+ | 2 | Bob | bob@example.com | +------+--------------+-------------------+
- old tests: launch tabulate via subprocess (still necessary) - new tests: the same checks for coverage reports
Use `X | Y` for type annotations
Unnecessary `int` call (rewrite as a literal)
Use format specifiers instead of percent format
Import from `collections.abc` instead
Add support of JSONL and CSV input file formats in CLI tabulate utility
Enforce ruff/flake8-bugbear rules (B)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.