Skip to content

Commit

Permalink
chore: Use noqa for PLW0603 (globals)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 15, 2024
1 parent 1e4903d commit 82738f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pelican/util/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_cursor(name="") -> psycopg2.extensions.cursor:
"""
Connect to the database, if needed, and return a database cursor.
"""
global db_connected, db_connection, db_cursor_idx
global db_connected, db_connection, db_cursor_idx # noqa: PLW0603
if not db_connected:
db_connection = psycopg2.connect(settings.DATABASE_URL)
db_connected = True
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ignore = [
"ARG001", # yapw callbacks
"DTZ001", "DTZ007", # allow naive datetimes from JSON data
"PLR2004", # magic values
"PLW0603", # db globals
]

[tool.ruff.lint.flake8-builtins]
Expand Down

0 comments on commit 82738f7

Please sign in to comment.