Open jessehouwing opened 1 year ago
Thank you for opening this issue, we will look into it.
I tried reproducing the steps to sucessfully built the repo, but failed. I got beyond this error by this specific error, but now it can't find azure-cli
. I'd love a devcontainer.json
that will be able to build the extensions inside this repo upon launch.
Ok, I got a bit further, but still encounter all kind sof strange errors left and right.
what I did so far, and this should really be part of the devcontainer.json
cd /workspaces
git clone https://github.com/Azure/azure-cli.git azure-cli
python3 -m venv env
source env/bin/activate
python -m pip install -U pip
pip install azdev
azdev setup --cli ./azure-cli --repo ./azure-cli-extensions
and then to scan my changes to the init extension:
azdev extension add init
azdev style init
************* Module /workspaces/azure-cli-extensions/pylintrc
azure-cli-extensions/pylintrc:1:0: E0015: Unrecognized option found: module-name-hint, const-name-hint, class-name-hint, class-attribute-name-hint, attr-name-hint, method-name-hint, function-name-hint, argument-name-hint, variable-name-hint, inlinevar-name-hint (unrecognized-option)
************* Module azext_init
azure-cli-extensions/src/init/azext_init/__init__.py:17:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
************* Module azext_init._utils
azure-cli-extensions/src/init/azext_init/_utils.py:37:43: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/_utils.py:72:49: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/_utils.py:74:49: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
************* Module azext_init.custom
azure-cli-extensions/src/init/azext_init/custom.py:57:43: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:59:71: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:76:43: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:79:71: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:115:42: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:116:42: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:133:54: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:182:42: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
azure-cli-extensions/src/init/azext_init/custom.py:189:27: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
------------------------------------------------------------------
Your code has been rated at 9.42/10 (previous run: 9.42/10, +0.00)
Pylint: FAILED
Running flake8 on extensions...
Traceback (most recent call last):
File "/home/codespace/.python/current/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/codespace/.python/current/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/workspaces/env/lib/python3.10/site-packages/flake8/__main__.py", line 7, in <module>
raise SystemExit(main())
File "/workspaces/env/lib/python3.10/site-packages/flake8/main/cli.py", line 23, in main
app.run(argv)
File "/workspaces/env/lib/python3.10/site-packages/flake8/main/application.py", line 198, in run
self._run(argv)
File "/workspaces/env/lib/python3.10/site-packages/flake8/main/application.py", line 186, in _run
self.initialize(argv)
File "/workspaces/env/lib/python3.10/site-packages/flake8/main/application.py", line 165, in initialize
self.plugins, self.options = parse_args(argv)
File "/workspaces/env/lib/python3.10/site-packages/flake8/options/parse_args.py", line 53, in parse_args
opts = aggregator.aggregate_options(option_manager, cfg, cfg_dir, rest)
File "/workspaces/env/lib/python3.10/site-packages/flake8/options/aggregator.py", line 30, in aggregate_options
parsed_config = config.parse_config(manager, cfg, cfg_dir)
File "/workspaces/env/lib/python3.10/site-packages/flake8/options/config.py", line 131, in parse_config
raise ValueError(
ValueError: Error code '#' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
Flake8: FAILED
Hi @jessehouwing Sorry for replying so late. I have been so busy recently that I just took the time to look into this issue today. Next I will delve into codespace and plan to add support for the Azure CLI repository and the Azure CLI extension repository.
I tried running
azdev style <YOUR_EXT>
in the codespace, but it crashes.had to run
pip install azdev
, it would be nice if the default codespace config for this repo includedazdev
by default.Originally posted by @jessehouwing in https://github.com/Azure/azure-cli-extensions/issues/6793#issuecomment-1730091737