flake8 6.0.0 raises ValueError for inline comments on ignore rule lines

Bug #1998094 reported by Mert Kirpici
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MongoDB Charm
Fix Released
Undecided
Mert Kirpici
Nagios Charm
Fix Released
Undecided
Mert Kirpici
Rsyslog Forwarder HA Charm
Fix Released
Undecided
Mert Kirpici
charm-cloudsupport
Fix Released
Undecided
Mert Kirpici
charm-duplicity
Fix Released
Undecided
Nishant Dash
charm-openstack-service-checks
Fix Released
Undecided
Mert Kirpici
charm-storage-connector
Fix Released
Undecided
Mert Kirpici
hw-health-charm
Fix Released
Undecided
Ashley James

Bug Description

This issue is currently affecting multiple charms after the flake8 6.0.0 release. flake8 expects to find the comments on their separate lines.

miles@mertkirpici-bastion-focal:~/repo/charm-openstack-service-checks$ make lint
Running lint checks
lint installed: black==22.10.0,click==8.1.3,flake8==6.0.0,flake8-colors==0.1.9,flake8-docstrings==1.6.0,flake8-import-order==0.18.2,mccabe==0.7.0,mypy-extensions==0.4.3,pathspec==0.10.2,pep8-naming==0.13.2,platformdirs==2.5.4,pycodestyle==2.10.0,pydocstyle==6.1.1,pyflakes==3.0.1,snowballstemmer==2.2.0,tomli==2.0.1,typing-extensions==4.4.0
lint run-test-pre: PYTHONHASHSEED='3949094690'
lint run-test: commands[0] | flake8
Traceback (most recent call last):
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/main/cli.py", line 23, in main
    app.run(argv)
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/main/application.py", line 198, in run
    self._run(argv)
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/main/application.py", line 186, in _run
    self.initialize(argv)
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/main/application.py", line 165, in initialize
    self.plugins, self.options = parse_args(argv)
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/options/parse_args.py", line 53, in parse_args
    opts = aggregator.aggregate_options(option_manager, cfg, cfg_dir, rest)
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/options/aggregator.py", line 30, in aggregate_options
    parsed_config = config.parse_config(manager, cfg, cfg_dir)
  File "/home/miles/repo/charm-openstack-service-checks/src/.tox/lint/lib/python3.8/site-packages/flake8/options/config.py", line 131, in parse_config
    raise ValueError(
ValueError: Error code '#TODO' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
ERROR: InvocationError for command /home/miles/repo/charm-openstack-service-checks/src/.tox/lint/bin/flake8 (exited with code 1)
____________________________________________________________________________________________________________ summary _____________________________________________________________________________________________________________
ERROR: lint: commands failed
make: *** [Makefile:63: lint] Error 1

Tags: bseng-619

Related branches

Changed in charm-mongodb:
assignee: nobody → Mert Kirpici (mertkirpici)
Changed in charm-rsyslog-forwarder-ha:
assignee: nobody → Mert Kirpici (mertkirpici)
Changed in charm-cloudsupport:
assignee: nobody → Mert Kirpici (mertkirpici)
Changed in charm-openstack-service-checks:
assignee: nobody → Mert Kirpici (mertkirpici)
Changed in charm-storage-connector:
assignee: nobody → Mert Kirpici (mertkirpici)
Changed in charm-mongodb:
status: New → In Progress
Changed in charm-rsyslog-forwarder-ha:
status: New → In Progress
Changed in charm-cloudsupport:
status: New → In Progress
Changed in charm-openstack-service-checks:
status: New → In Progress
Changed in charm-storage-connector:
status: New → In Progress
Changed in charm-nagios:
status: New → In Progress
assignee: nobody → Mert Kirpici (mertkirpici)
Changed in charm-storage-connector:
status: In Progress → Fix Committed
Eric Chen (eric-chen)
tags: added: bseng-619
Changed in charm-mongodb:
status: In Progress → Fix Committed
Changed in charm-nagios:
status: In Progress → Fix Committed
Changed in charm-duplicity:
assignee: nobody → Nishant Dash (dash3)
status: New → In Progress
Changed in charm-rsyslog-forwarder-ha:
status: In Progress → Fix Committed
Changed in charm-cloudsupport:
status: In Progress → Fix Committed
Changed in charm-openstack-service-checks:
status: In Progress → Fix Committed
Changed in charm-duplicity:
status: In Progress → Fix Committed
Changed in charm-rsyslog-forwarder-ha:
milestone: none → 23.01
Changed in charm-storage-connector:
milestone: none → 23.01
Changed in charm-cloudsupport:
milestone: none → 23.01
Changed in charm-duplicity:
milestone: none → 23.01
Changed in charm-mongodb:
milestone: none → 23.01
Changed in charm-nagios:
milestone: none → 23.01
Changed in charm-openstack-service-checks:
milestone: none → 23.01
Changed in charm-cloudsupport:
status: Fix Committed → Fix Released
Changed in charm-duplicity:
status: Fix Committed → Fix Released
Changed in charm-nagios:
status: Fix Committed → Fix Released
Changed in charm-openstack-service-checks:
status: Fix Committed → Fix Released
Changed in charm-rsyslog-forwarder-ha:
status: Fix Committed → Fix Released
Changed in charm-storage-connector:
status: Fix Committed → Fix Released
Changed in charm-mongodb:
status: Fix Committed → Fix Released
Changed in charm-hw-health:
assignee: nobody → Ashley James (dashmage)
status: New → In Progress
Ashley James (dashmage)
Changed in charm-hw-health:
status: In Progress → Fix Released
milestone: none → 23.01
Ashley James (dashmage)
Changed in charm-hw-health:
status: Fix Released → Fix Committed
milestone: 23.01 → none
Changed in charm-hw-health:
milestone: none → 23.04
Changed in charm-hw-health:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.