Skip to content

Commit

Permalink
csvlook: Add "Disable reformatting of values." to help text, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 17, 2023
1 parent a5bd024 commit 8628306
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion csvkit/utilities/csvlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_arguments(self):
'Specify "0" to disable sniffing entirely, or "-1" to sniff the entire file.')
self.argparser.add_argument(
'-I', '--no-inference', dest='no_inference', action='store_true',
help='Disable type inference when parsing the input.')
help='Disable type inference when parsing the input. Disable reformatting of values.')

def main(self):
if self.additional_input_expected():
Expand Down
1 change: 1 addition & 0 deletions docs/scripts/csvlook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Renders a CSV to the command line in a Markdown-compatible, fixed-width format:
Limit CSV dialect sniffing to the specified number of
bytes. Specify "0" to disable sniffing.
-I, --no-inference Disable type inference when parsing the input.
Disable reformatting of values.
If a table is too wide to display properly try piping the output to ``less -S`` or truncating it using :doc:`csvcut`.

Expand Down

2 comments on commit 8628306

@eyalroz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicks:

  • I'd phrase it "Disable ABC and DEF" rather than "Disable ABC. Disable DEF".
  • Does the "type inference" mean anything outside the context of reformatting-of-values? If the values have the same format, does their type matter at all?

@jpmckinney
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every other CSV Kit tool has -I --no-inference with the description "Disable type inference when parsing the input." Inconsistent descriptions might create doubts for users. I added the second clause to resolve the issue you opened. I'll change it to "This disables the reformatting of values" so that it is clear that it is just a consequence of the first clause.

Please sign in to comment.