From 72472157434f5c13e4a9612090f05a9335897504 Mon Sep 17 00:00:00 2001 From: Achal Date: Fri, 3 Apr 2026 15:46:33 +0530 Subject: [PATCH 1/4] fix: separate pylint config for opentracing example to resolve FIXME --- tox.ini | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tox.ini b/tox.ini index 2060955102..b7d29b34fb 100644 --- a/tox.ini +++ b/tox.ini @@ -39,6 +39,7 @@ envlist = py3{9,10,11,12,13,14,14t}-test-opentelemetry-opentracing-shim pypy3-test-opentelemetry-opentracing-shim lint-opentelemetry-opentracing-shim + lint-opentelemetry-opentracing-example py3{9,10,11,12,13,14}-test-opentelemetry-opencensus-shim ; opencensus-shim intentionally excluded from pypy3 (grpcio install fails) @@ -408,3 +409,12 @@ deps = pre-commit commands = pre-commit run --color=always --all-files {posargs} + +[testenv:lint-opentelemetry-opentracing-example] +deps = + -r dev-requirements.txt + -r {toxinidir}/docs/examples/opentracing/requirements.txt +setenv = + PYTHONPATH = {toxinidir}/docs/examples/opentracing +commands = + pylint --rcfile {toxinidir}/.pylintrc --disable=unexpected-line-ending-format {toxinidir}/docs/examples/opentracing \ No newline at end of file From e0775256a69580d978f0db70210ce8316e89a575 Mon Sep 17 00:00:00 2001 From: Achal Date: Fri, 3 Apr 2026 15:59:12 +0530 Subject: [PATCH 2/4] chore: regenerate workflows for opentracing example lint env --- .github/workflows/lint.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 81f7bb4079..d7c7e0b801 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -176,6 +176,25 @@ jobs: - name: Run tests run: tox -e lint-opentelemetry-opentracing-shim + lint-opentelemetry-opentracing-example: + name: opentelemetry-opentracing-example + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repo @ SHA - ${{ github.sha }} + uses: actions/checkout@v4 + + - name: Set up Python 3.14 + uses: actions/setup-python@v5 + with: + python-version: "3.14" + + - name: Install tox + run: pip install tox-uv + + - name: Run tests + run: tox -e lint-opentelemetry-opentracing-example + lint-opentelemetry-opencensus-shim: name: opentelemetry-opencensus-shim runs-on: ubuntu-latest From 23a42258c841a92c07cc0866257ede0427e13345 Mon Sep 17 00:00:00 2001 From: Achal Date: Fri, 3 Apr 2026 19:52:17 +0530 Subject: [PATCH 3/4] fix: remove pylint disable and resolve FIXME in opentracing example --- docs/examples/opentracing/rediscache.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/examples/opentracing/rediscache.py b/docs/examples/opentracing/rediscache.py index 61025eac72..e6d9a1eca8 100644 --- a/docs/examples/opentracing/rediscache.py +++ b/docs/examples/opentracing/rediscache.py @@ -7,11 +7,8 @@ import pickle from functools import wraps -# FIXME The pylint disablings are needed here because the code of this -# example is being executed against the tox.ini of the main -# opentelemetry-python project. Find a way to separate the two. -import redis # pylint: disable=import-error -import redis_opentracing # pylint: disable=import-error +import redis +import redis_opentracing class RedisCache: From f86bdf07c91cda47f19bda14bd4d490b8b5a0b05 Mon Sep 17 00:00:00 2001 From: Achal Date: Sat, 4 Apr 2026 10:11:55 +0530 Subject: [PATCH 4/4] fix: use dedicated .pylintrc for opentracing example and add newline --- docs/examples/opentracing/.pylintrc | 9 +++++++++ tox.ini | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 docs/examples/opentracing/.pylintrc diff --git a/docs/examples/opentracing/.pylintrc b/docs/examples/opentracing/.pylintrc new file mode 100644 index 0000000000..91f98df0b4 --- /dev/null +++ b/docs/examples/opentracing/.pylintrc @@ -0,0 +1,9 @@ +[MASTER] +init-hook='import sys; sys.path.insert(0, ".")' + +[MESSAGES CONTROL] +disable=missing-docstring, + too-few-public-methods + +[FORMAT] +expected-line-ending-format= \ No newline at end of file diff --git a/tox.ini b/tox.ini index b7d29b34fb..92e8530a41 100644 --- a/tox.ini +++ b/tox.ini @@ -417,4 +417,5 @@ deps = setenv = PYTHONPATH = {toxinidir}/docs/examples/opentracing commands = - pylint --rcfile {toxinidir}/.pylintrc --disable=unexpected-line-ending-format {toxinidir}/docs/examples/opentracing \ No newline at end of file + pylint --rcfile {toxinidir}/docs/examples/opentracing/.pylintrc {toxinidir}/docs/examples/opentracing + \ No newline at end of file