Skip to content
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

Change pylint invocation to avoid namespace clashes #382

Closed
c24t opened this issue Jan 28, 2020 · 3 comments
Closed

Change pylint invocation to avoid namespace clashes #382

c24t opened this issue Jan 28, 2020 · 3 comments
Labels
backlog build & infra Issues related to build & infrastructure. release:after-ga To be resolved after GA release

Comments

@c24t
Copy link
Member

c24t commented Jan 28, 2020

See #376 (comment).

Right now eachdist.py generates a long pylint command that lints the entire project in one run, which raises false errors (especially no-member errors) if two modules import different classes or modules with the same local name.

It's easy to fix this by linting each file separately, which eachdist.py already supports:

diff --git a/scripts/eachdist.py b/scripts/eachdist.py
index 8d41315f..c23e8853 100755
--- a/scripts/eachdist.py
+++ b/scripts/eachdist.py
@@ -478,9 +478,7 @@ def lint_args(args):
     )
     runsubprocess(args.dry_run, ("flake8", rootdir), check=True)
     execute_args(
-        parse_subargs(
-            args, ("exec", "pylint {}", "--all", "--mode", "lintroots",),
-        )
+        parse_subargs(args, ("exec", "pylint {}", "--mode", "lintroots",),)
     )

But this makes lint significantly slower. A better solution might be to lint each package separately, or lint all files separately in parallel.

@c24t c24t added the build & infra Issues related to build & infrastructure. label Jan 28, 2020
@Oberon00
Copy link
Member

A first step would be to keep linting all the src/ folders in one run (if we have clashes there, that's an error) and lint each test, example, etc, separately. Another fix/workaround would be to move all tests to some uniquely named subfolder.

srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
@lzchen lzchen added the release:after-ga To be resolved after GA release label Dec 18, 2020
@github-actions
Copy link

This issue was marked stale due to lack of activity. It will be closed in 30 days.

@github-actions
Copy link

Closed as inactive. Feel free to reopen if this issue needs resolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog build & infra Issues related to build & infrastructure. release:after-ga To be resolved after GA release
Projects
None yet
Development

No branches or pull requests

3 participants