Skip to content

Commit 12ac2ef

Browse files
Enforce ruff rule RUF046
RUF046 Value being cast to `int` is already an integer
1 parent 4c4aee2 commit 12ac2ef

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
@@ -174,7 +174,7 @@ def build_name_function(max_int: float) -> Callable[[int], str]:
174174
# handle corner cases max_int is 0 or exact power of 10
175175
max_int += 1e-8
176176

177-
pad_length = int(math.ceil(math.log10(max_int)))
177+
pad_length = math.ceil(math.log10(max_int))
178178

179179
def name_function(i: int) -> str:
180180
return str(i).zfill(pad_length)

pyproject.toml

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

0 commit comments

Comments
 (0)