Skip to content

Commit 234b633

Browse files
committed
Fix some pylint warnings
1 parent b5a99c0 commit 234b633

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

bottles/backend/models/btrfssubvolume.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def create_bare_destination() -> DuplicateResult:
8686
return DuplicateResult.NOTHING
8787
case btrfsutil.ERROR_SNAP_CREATE_FAILED:
8888
return create_bare_destination()
89-
case other:
89+
case _:
9090
raise error
9191
for internal_subvolume in _internal_subvolumes:
9292
internal_source_path = os.path.join(source_path, internal_subvolume)
@@ -171,9 +171,9 @@ def read_active_snapshot_id(self) -> int:
171171
try:
172172
with open(self._active_snapshot_id_path(), "r") as file:
173173
return int(file.read())
174-
except OSError as error:
174+
except OSError:
175175
return -1
176-
176+
177177
def create_snapshot(self, description: str) -> int:
178178
snapshot_id = max(self._snapshots.keys(), default=-1) + 1
179179
snapshot_path = self._snapshot_path2(snapshot_id, description)
@@ -232,7 +232,7 @@ def convert_states(self):
232232

233233
def is_initialized(self):
234234
# Nothing to initialize
235-
return true
235+
return True
236236

237237
def re_initialize(self):
238238
# Nothing to initialize
@@ -257,12 +257,11 @@ def list_states(self) -> Result:
257257
data={"state_id": active_state_id, "states": self.convert_states()},
258258
message="Retrieved list of states",
259259
)
260-
260+
261261
def set_state(
262262
self, state_id: int, after: callable
263263
) -> Result:
264264
self._handle.set_state(state_id)
265265
if after:
266266
after()
267267
return Result(True)
268-

0 commit comments

Comments
 (0)