-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix exclude regression #387
Conversation
Signed-off-by: methylDragon <methylDragon@gmail.com>
1a9e4ab
to
6915bc6
Compare
Signed-off-by: methylDragon <methylDragon@gmail.com>
6915bc6
to
b9c8f3f
Compare
Unstable windows build is unrelated to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small nit but approving regardless. I think the only thing that would change if you initialized the OptionManager for flake8-4.x would be the order in which you try-except with the aggregator.
ament_flake8/ament_flake8/main.py
Outdated
def parse_config_file(config_file): | ||
from flake8.options import config, manager, aggregator | ||
|
||
opts_manager = manager.OptionManager(prog='flake8', version='3.0.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 3.x? In Ubuntu 22.04 the default flake8 version is 4.x.
Signed-off-by: methylDragon <methylDragon@gmail.com>
3bf3ed3
to
5a5d913
Compare
Unstable focal aarch64 build is unrelated to this PR |
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
#451) * Fix exclude regression (#387) * Fix compatibility with flake8 version 5 (#410) * Fix compatibility with flake8 version 5 The ConfigFileFinder class no longer exists in flake8 version 5. The get_style_guide() code has been updated from the latest api.legacy.get_style_guide() in flake8. Signed-off-by: Timo Röhling <roehling@debian.org> Co-authored-by: Chris Lalancette <clalancette@gmail.com> Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> Co-authored-by: methylDragon <methylDragon@gmail.com>
This PR fixes #382 by explicitly adding any exclude args in the flake8 config file (normally
configuration/ament_flake8.ini
) to the exclude arglist.Notably, this uses the same parsing logic that the version of flake8 ROS is using on focal and jammy (3.9.7 and 4.0.0).
I tried to account for differences in the parsing logic between 3.9.7 and 4.0.0 with a try except clause.