Skip to content

Commit

Permalink
Apply ruff rule RUF101 (#1501)
Browse files Browse the repository at this point in the history
RUF101 `PGH001` is a redirect to `S307`
  • Loading branch information
DimitriPapadopoulos authored May 19, 2024
1 parent 6a147fc commit ae8c3fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/hatchling/licenses/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def normalize_license_expression(raw_license_expression: str) -> str:

python_expression = ' '.join(python_tokens)
try:
result = eval(python_expression) # noqa: PGH001, S307
result = eval(python_expression) # noqa: S307
except Exception: # noqa: BLE001
result = True

Expand Down
2 changes: 1 addition & 1 deletion backend/src/hatchling/version/source/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_version_data(self) -> dict:
sys.path[:] = old_search_paths

# Execute the expression to determine the version
version = eval(expression, vars(module)) # noqa: PGH001, S307
version = eval(expression, vars(module)) # noqa: S307

return {'version': version}

Expand Down

0 comments on commit ae8c3fb

Please sign in to comment.