Skip to content

Commit 1c88466

Browse files
Enforce ruff rule RUF046
RUF046 Value being cast to `int` is already an integer
1 parent 0680a18 commit 1c88466

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

fsspec/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def build_name_function(max_int: float) -> Callable[[int], str]:
172172
# handle corner cases max_int is 0 or exact power of 10
173173
max_int += 1e-8
174174

175-
pad_length = int(math.ceil(math.log10(max_int)))
175+
pad_length = math.ceil(math.log10(max_int))
176176

177177
def name_function(i: int) -> str:
178178
return str(i).zfill(pad_length)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ select = [
182182
"RUF019",
183183
"RUF022",
184184
"RUF024",
185+
"RUF046",
185186
"SIM",
186187
"SLOT",
187188
"SIM101",

0 commit comments

Comments
 (0)