Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/examples/opencensus-shim/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ def setup_db():
@app.route("/")
def hello_world():
lines = []
with tracer.start_as_current_span("query movies from db"), sqlite3.connect(
DB
) as con:
with (
tracer.start_as_current_span("query movies from db"),
sqlite3.connect(DB) as con,
):
cur = con.cursor()
for title, year in cur.execute("SELECT title, year from movie"):
lines.append(f"<li>{title} is from the year {year}</li>")
Expand Down
5 changes: 3 additions & 2 deletions opentelemetry-sdk/tests/logs/test_log_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def test_invalid_env_vars_raise(self):

for env_var, bad_value in test_cases.items():
with self.subTest(f"Testing {env_var}={bad_value}"):
with self.assertRaises(ValueError) as error, patch.dict(
"os.environ", {env_var: bad_value}, clear=True
with (
self.assertRaises(ValueError) as error,
patch.dict("os.environ", {env_var: bad_value}, clear=True),
):
LogRecordLimits()

Expand Down
5 changes: 3 additions & 2 deletions opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2072,8 +2072,9 @@ def test_invalid_env_vars_raise(self):

for env_var, bad_value in test_cases.items():
with self.subTest(f"Testing {env_var}={bad_value}"):
with self.assertRaises(ValueError) as error, patch.dict(
"os.environ", {env_var: bad_value}, clear=True
with (
self.assertRaises(ValueError) as error,
patch.dict("os.environ", {env_var: bad_value}, clear=True),
):
trace.SpanLimits()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ log_cli = true

[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
target-version = "py38"
target-version = "py39"
line-length = 79
extend-exclude = [
"*_pb2*.py*",
Expand Down
Loading