Skip to content

Conversation

@jhradilek
Copy link
Owner

When reading from standard input, the dita-convert utlity previously displayed the exposed IO object in error messages and warnings:

$ cat file.dita | dita-convert -g
dita-convert: <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>: error: unsupported outputclass "snippet", use -t/--type

This pull requests excludes the file name from error messages and warnings when reading from standard input:

$ cat file.dita | dita-convert -g
dita-convert: error: unsupported outputclass "snippet", use -t/--type

Implementation checklist

  • The code changes come with the corresponding test cases
  • The code changes pass all tests (run python3 -m unittest in the project directory)
  • The code changes come with appropriate documentation

@jhradilek jhradilek self-assigned this Oct 22, 2025
@jhradilek jhradilek added the enhancement New feature or request label Oct 22, 2025
@jhradilek jhradilek merged commit 541ba0c into main Oct 22, 2025
5 checks passed
@jhradilek jhradilek deleted the prettier-stdin branch October 22, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants