Skip to content

Commit fa93e43

Browse files
authored
Merge pull request #5 from MarcoGorelli/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents c380697 + 6130154 commit fa93e43

File tree

4 files changed

+114
-222
lines changed

4 files changed

+114
-222
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.2.1
4+
rev: v0.3.2
55
hooks:
66
# Run the formatter.
77
- id: ruff-format
88
# Run the linter.
99
- id: ruff
1010
args: [--fix]
1111
- repo: https://github.com/pre-commit/mirrors-mypy
12-
rev: 'v1.8.0'
12+
rev: 'v1.9.0'
1313
hooks:
1414
- id: mypy
1515
additional_dependencies: ['polars==0.20.10', 'pytest==8.0.1']

narwhals/pandas_like/dtypes.py

+18-36
Original file line numberDiff line numberDiff line change
@@ -21,73 +21,55 @@ def __eq__(self, other: DType | type[DType]) -> bool: # type: ignore[override]
2121
return isinstance_or_issubclass(other, type(self))
2222

2323

24-
class NumericType(DType):
25-
...
24+
class NumericType(DType): ...
2625

2726

28-
class TemporalType(DType):
29-
...
27+
class TemporalType(DType): ...
3028

3129

32-
class Int64(NumericType):
33-
...
30+
class Int64(NumericType): ...
3431

3532

36-
class Int32(NumericType):
37-
...
33+
class Int32(NumericType): ...
3834

3935

40-
class Int16(NumericType):
41-
...
36+
class Int16(NumericType): ...
4237

4338

44-
class Int8(NumericType):
45-
...
39+
class Int8(NumericType): ...
4640

4741

48-
class UInt64(NumericType):
49-
...
42+
class UInt64(NumericType): ...
5043

5144

52-
class UInt32(NumericType):
53-
...
45+
class UInt32(NumericType): ...
5446

5547

56-
class UInt16(NumericType):
57-
...
48+
class UInt16(NumericType): ...
5849

5950

60-
class UInt8(NumericType):
61-
...
51+
class UInt8(NumericType): ...
6252

6353

64-
class Float64(NumericType):
65-
...
54+
class Float64(NumericType): ...
6655

6756

68-
class Float32(NumericType):
69-
...
57+
class Float32(NumericType): ...
7058

7159

72-
class String(DType):
73-
...
60+
class String(DType): ...
7461

7562

76-
class Boolean(DType):
77-
...
63+
class Boolean(DType): ...
7864

7965

80-
class Object(DType):
81-
...
66+
class Object(DType): ...
8267

8368

84-
class Datetime(DType):
85-
...
69+
class Datetime(DType): ...
8670

8771

88-
class Date(DType):
89-
...
72+
class Date(DType): ...
9073

9174

92-
class Duration(DType):
93-
...
75+
class Duration(DType): ...

narwhals/polars.py

+16-32
Original file line numberDiff line numberDiff line change
@@ -154,68 +154,52 @@ def is_numeric(cls: type[Self]) -> bool:
154154
return reverse_translate_dtype(cls).is_numeric() # type: ignore[no-any-return]
155155

156156

157-
class NumericType(DType):
158-
...
157+
class NumericType(DType): ...
159158

160159

161-
class TemporalType(DType):
162-
...
160+
class TemporalType(DType): ...
163161

164162

165-
class Int64(NumericType):
166-
...
163+
class Int64(NumericType): ...
167164

168165

169-
class Int32(NumericType):
170-
...
166+
class Int32(NumericType): ...
171167

172168

173-
class Int16(NumericType):
174-
...
169+
class Int16(NumericType): ...
175170

176171

177-
class Int8(NumericType):
178-
...
172+
class Int8(NumericType): ...
179173

180174

181-
class UInt64(NumericType):
182-
...
175+
class UInt64(NumericType): ...
183176

184177

185-
class UInt32(NumericType):
186-
...
178+
class UInt32(NumericType): ...
187179

188180

189-
class UInt16(NumericType):
190-
...
181+
class UInt16(NumericType): ...
191182

192183

193-
class UInt8(NumericType):
194-
...
184+
class UInt8(NumericType): ...
195185

196186

197-
class Float64(NumericType):
198-
...
187+
class Float64(NumericType): ...
199188

200189

201-
class Float32(NumericType):
202-
...
190+
class Float32(NumericType): ...
203191

204192

205-
class String(DType):
206-
...
193+
class String(DType): ...
207194

208195

209-
class Boolean(DType):
210-
...
196+
class Boolean(DType): ...
211197

212198

213-
class Datetime(TemporalType):
214-
...
199+
class Datetime(TemporalType): ...
215200

216201

217-
class Date(TemporalType):
218-
...
202+
class Date(TemporalType): ...
219203

220204

221205
class Namespace(NamespaceProtocol):

0 commit comments

Comments
 (0)