diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-01 10:10:47 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-01 10:10:47 +0200 |
commit | b94f29c55685f7bce4d83f08a938a4c2a4e62806 (patch) | |
tree | c253ce222c89914ad09b846b62a4115979c9a289 | |
parent | b6162e8fa1963057f6f1eb11ff2c90ea96994430 (diff) | |
download | pylint-git-b94f29c55685f7bce4d83f08a938a4c2a4e62806.tar.gz |
using-constant-test has a false positive when using getattr(), so disable that error locally
-rw-r--r-- | pylint/lint.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/lint.py b/pylint/lint.py index 76d953f2b..7e5414540 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -236,8 +236,8 @@ MSGS = { def _cpu_count() -> int: """Use sched_affinity if available for virtualized or containerized environments.""" sched_getaffinity = getattr(os, "sched_getaffinity", None) + # pylint: disable=not-callable,using-constant-test if sched_getaffinity: - # pylint: disable=not-callable return len(sched_getaffinity(0)) if multiprocessing: return multiprocessing.cpu_count() |