From 44da3848538b6a756b5edf104a798f538ab0292c Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Fri, 23 Sep 2022 12:48:37 +0530 Subject: [PATCH] Minor updates to scripts (#1351) --- .../src/opentelemetry/instrumentation/falcon/__init__.py | 2 ++ scripts/build.sh | 5 ++--- scripts/eachdist.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py index 8a21ca429ee0..fb0f14a2d549 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py @@ -456,6 +456,7 @@ class FalconInstrumentor(BaseInstrumentor): def instrumentation_dependencies(self) -> Collection[str]: return _instruments + # pylint:disable=no-self-use def _remove_instrumented_middleware(self, app): if ( hasattr(app, "_is_instrumented_by_opentelemetry") @@ -477,6 +478,7 @@ def _remove_instrumented_middleware(self, app): for x in app._middlewares_list if not isinstance(x, _TraceMiddleware) ] + # pylint: disable=c-extension-no-member app._middleware = falcon.api_helpers.prepare_middleware( app._middlewares_list, independent_middleware=app._independent_middleware, diff --git a/scripts/build.sh b/scripts/build.sh index 78ef44dec8f7..56b350257ab3 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -27,14 +27,13 @@ DISTDIR=dist fi ) done - # Build a wheel for each source distribution ( cd $DISTDIR for x in *.tar.gz ; do # NOTE: We filter beta vs 1.0 package at this point because we can read the # version directly from the .tar.gz file. - if (echo "$x" | grep -Eq ^opentelemetry-.*-0\..*\.tar\.gz$); then - pip wheel --no-deps $x + if (echo "$x" | grep -Eq ^opentelemetry_.*-0\..*\.tar\.gz$); then + : else echo "Skipping $x because it is not in pre-1.0 state and should be released using a tag." rm $x diff --git a/scripts/eachdist.py b/scripts/eachdist.py index 755601335dc0..570a0cd0e57d 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -282,7 +282,7 @@ def find_targets_unordered(rootpath): continue if any( (subdir / marker).exists() - for marker in ("pyproject.toml") + for marker in ("pyproject.toml",) ): yield subdir else: @@ -647,7 +647,7 @@ def update_dependencies(targets, version, packages): targets, "pyproject.toml", fr"({package_name}.*)==(.*)", - r"\1== " + version, + r"\1== " + version + '",', )