Skip to content

Commit 7787bbb

Browse files
committed
ref: changes to match linting requirements
1 parent 04771cf commit 7787bbb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ceph_devstack/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from ceph_devstack.resources.ceph import CephDevStack
1010

1111

12-
def main():
12+
def main(): # noqa: C901
1313
args = parse_args(sys.argv[1:])
1414
config.load(args.config_file)
1515
if args.verbose:

ceph_devstack/host.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ async def check_selinux_bool(self, name: str):
9999
proc = await host.arun(["getsebool", name])
100100
assert proc.stdout is not None
101101
out = await proc.stdout.read()
102-
if out.decode().strip() != f"{name} --> on":
103-
return False
104-
return True
102+
return out.decode().strip() != f"{name} --> on"
105103

106104
async def get_sysctl_value(self, name: str) -> int:
107105
proc = await host.arun(["sysctl", "-b", name])

ruff.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[lint]
2+
extend-select = ["B", "C", "SIM"]

0 commit comments

Comments
 (0)