Skip to content

Commit

Permalink
Merge pull request #5 from MarcoGorelli/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
MarcoGorelli authored Mar 13, 2024
2 parents c380697 + 6130154 commit fa93e43
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 222 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.1
rev: v0.3.2
hooks:
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff
args: [--fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
rev: 'v1.9.0'
hooks:
- id: mypy
additional_dependencies: ['polars==0.20.10', 'pytest==8.0.1']
Expand Down
54 changes: 18 additions & 36 deletions narwhals/pandas_like/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,73 +21,55 @@ def __eq__(self, other: DType | type[DType]) -> bool: # type: ignore[override]
return isinstance_or_issubclass(other, type(self))


class NumericType(DType):
...
class NumericType(DType): ...


class TemporalType(DType):
...
class TemporalType(DType): ...


class Int64(NumericType):
...
class Int64(NumericType): ...


class Int32(NumericType):
...
class Int32(NumericType): ...


class Int16(NumericType):
...
class Int16(NumericType): ...


class Int8(NumericType):
...
class Int8(NumericType): ...


class UInt64(NumericType):
...
class UInt64(NumericType): ...


class UInt32(NumericType):
...
class UInt32(NumericType): ...


class UInt16(NumericType):
...
class UInt16(NumericType): ...


class UInt8(NumericType):
...
class UInt8(NumericType): ...


class Float64(NumericType):
...
class Float64(NumericType): ...


class Float32(NumericType):
...
class Float32(NumericType): ...


class String(DType):
...
class String(DType): ...


class Boolean(DType):
...
class Boolean(DType): ...


class Object(DType):
...
class Object(DType): ...


class Datetime(DType):
...
class Datetime(DType): ...


class Date(DType):
...
class Date(DType): ...


class Duration(DType):
...
class Duration(DType): ...
48 changes: 16 additions & 32 deletions narwhals/polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,68 +154,52 @@ def is_numeric(cls: type[Self]) -> bool:
return reverse_translate_dtype(cls).is_numeric() # type: ignore[no-any-return]


class NumericType(DType):
...
class NumericType(DType): ...


class TemporalType(DType):
...
class TemporalType(DType): ...


class Int64(NumericType):
...
class Int64(NumericType): ...


class Int32(NumericType):
...
class Int32(NumericType): ...


class Int16(NumericType):
...
class Int16(NumericType): ...


class Int8(NumericType):
...
class Int8(NumericType): ...


class UInt64(NumericType):
...
class UInt64(NumericType): ...


class UInt32(NumericType):
...
class UInt32(NumericType): ...


class UInt16(NumericType):
...
class UInt16(NumericType): ...


class UInt8(NumericType):
...
class UInt8(NumericType): ...


class Float64(NumericType):
...
class Float64(NumericType): ...


class Float32(NumericType):
...
class Float32(NumericType): ...


class String(DType):
...
class String(DType): ...


class Boolean(DType):
...
class Boolean(DType): ...


class Datetime(TemporalType):
...
class Datetime(TemporalType): ...


class Date(TemporalType):
...
class Date(TemporalType): ...


class Namespace(NamespaceProtocol):
Expand Down
Loading

0 comments on commit fa93e43

Please sign in to comment.