Skip to content

Commit 53a9272

Browse files
authored
Enable ruff's perflint (PERF) rules (#2886)
1 parent 28e3cf3 commit 53a9272

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pygmt/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,9 @@ def print_clib_info(file=sys.stdout):
8585
"""
8686
from pygmt.clib import Session
8787

88-
lines = ["GMT library information:"]
88+
print("GMT library information:", file=file)
8989
with Session() as ses:
90-
for key in sorted(ses.info):
91-
lines.append(f" {key}: {ses.info[key]}")
90+
lines = [f" {key}: {ses.info[key]}" for key in sorted(ses.info)]
9291
print("\n".join(lines), file=file)
9392

9493

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ select = [
112112
"N", # pep8-naming
113113
"NPY", # numpy
114114
"PD", # pandas-vet
115+
"PERF", # perflint
115116
"PGH", # pygrep-hooks
116117
"PIE", # flake8-pie
117118
"PL", # pylint

0 commit comments

Comments
 (0)