Bug report
Bug description:
According to
|
parser.add_argument('type', nargs='+', help='a type to search') |
, the use of nargs='+' indicates that the original intention was to support passing multiple files and identifying their MIME types one by one
However, the current behavior only processes the first file. For example, running the following command:
> python mimetypes.py 1.pdf 1.png
type: application/pdf encoding: None
only outputs the type information for 1.pdf, while 1.png is ignored.
CPython versions tested on:
3.14
Operating systems tested on:
Windows
Linked PRs
Bug report
Bug description:
According to
cpython/Lib/mimetypes.py
Line 714 in f519918
, the use of
nargs='+'indicates that the original intention was to support passing multiple files and identifying their MIME types one by oneHowever, the current behavior only processes the first file. For example, running the following command:
> python mimetypes.py 1.pdf 1.png type: application/pdf encoding: Noneonly outputs the type information for
1.pdf, while1.pngis ignored.CPython versions tested on:
3.14
Operating systems tested on:
Windows
Linked PRs