Hi 👋 , thanks for the great tool! I noticed that failing to pass in a path or paths to cython-lint results in the confusing error,
Traceback (most recent call last):
File "/Users/nicholas/micromamba/bin/cython-lint", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/nicholas/micromamba/lib/python3.11/site-packages/cython_lint/cython_lint.py", line 898, in main
config = {k.replace('-', '_'): v for k, v in _get_config(paths).items()}
^^^^^^^^^^^^^^^^^^
File "/Users/nicholas/micromamba/lib/python3.11/site-packages/cython_lint/cython_lint.py", line 852, in _get_config
root = pathlib.Path(os.path.commonpath(paths))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen posixpath>", line 531, in commonpath
ValueError: commonpath() arg is an empty sequence
I believe a simple remedy for this would be to replace the line
parser.add_argument('paths', nargs='*')
with
parser.add_argument('paths', nargs='+')
This should produce a more helpful error message with users make silly mistakes (like me).
Hi 👋 , thanks for the great tool! I noticed that failing to pass in a path or paths to
cython-lint
results in the confusing error,I believe a simple remedy for this would be to replace the line
with
This should produce a more helpful error message with users make silly mistakes (like me).