-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
local-plugins relative paths are resolved relative to all paths not just the one the path directive is found #759
Comments
In GitLab by @graingert on Jul 13, 2020, 09:00 here the code is looking at all the base dirs of all the config files, and doesn't associate the configs' path to the config file it was found in: |
In GitLab by @graingert on Jul 13, 2020, 09:01 moved from https://gitlab.com/pycqa/flake8/-/merge_requests/442 |
In GitLab by @ericvw on Jul 13, 2020, 09:19 Yeah, this is similar to #517, which has been non-trivial in working towards. The configuration handling is a bit convoluted and I've been trying to work towards having a common place where path normalization occurs relative to the configuration file. I haven't spent much time on the plugin configuration. However, for other options, the core problem is the configuration files are all merged together first, and then path normalization occurs. It's not as straight-forward to re-order the steps. The code you linked to here may be easier to change because |
In GitLab by @ericvw on Jul 13, 2020, 09:43 Unfortunately, I've been lacking spare cycles lately. I'll see if I can find some towards making more progress in this area. Thanks for raising the issue because it's useful for me to know where path normalization occurs :). Without knowing all your configuration options, a workaround to this issue is to have separate |
In GitLab by @graingert on Jul 13, 2020, 08:57
Please describe how you installed Flake8
pre-commit of course
Please provide the exact, unmodified output of
flake8 --bug-report
Please describe the problem or feature
the paths are resolved relative to all paths not just the one the path directive is found in eg:
when running
flake8 --append-config=foo/bar/.flake8 --append-config=foo/.flake8
flake8 will addfoo/baz
andfoo/bar/baz
to LocalPlugins.pathsThe text was updated successfully, but these errors were encountered: