When using import-linter with click~=6.0 or ~=7.0, below error will occour:
❯ lint-imports
Traceback (most recent call last):
File "lint-imports", line 8, in <module>
sys.exit(lint_imports_command())
... omited ...
File "lib/python3.8/site-packages/click/core.py", line 1405, in type_cast_value
raise TypeError('Attempted to invoke composite type '
TypeError: Attempted to invoke composite type but nargs has been set to 0. This is not supported; nargs needs to be set to a fixed value > 1.
Through some investigation, I found that this error was caused by the default value of the "--contract" option. The value was set to an empty tuple in the current codebase, causing the click library to treat it as a "composite type" and misbehave.
This PR fixes that by changing the default to an empty list.
When using import-linter with click~=6.0 or ~=7.0, below error will occour:
Through some investigation, I found that this error was caused by the default value of the "--contract" option. The value was set to an empty tuple in the current codebase, causing the click library to treat it as a "composite type" and misbehave.
This PR fixes that by changing the default to an empty list.