Skip to content

Commit

Permalink
fix(refactoring): Split datatype module into types and literals packa…
Browse files Browse the repository at this point in the history
…ges (#152)
  • Loading branch information
xmnlab authored Nov 29, 2024
1 parent 1997e75 commit 90e828f
Show file tree
Hide file tree
Showing 40 changed files with 1,213 additions and 940 deletions.
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ default_stages:
- pre-commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-toml
- id: check-xml
- id: debug-statements
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: detect-private-key

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
Expand Down
91 changes: 45 additions & 46 deletions src/astx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
base,
blocks,
callables,
datatypes,
flows,
literals,
mixes,
operators,
packages,
symbol_table,
types,
variables,
)
from astx.base import (
Expand All @@ -38,23 +38,17 @@
FunctionReturn,
LambdaExpr,
)
from astx.datatypes import (
Boolean,
Complex,
Complex32,
Complex64,
DataTypeOps,
Date,
DateTime,
Float16,
Float32,
Float64,
Floating,
Int8,
Int16,
Int32,
Int64,
Integer,
from astx.flows import (
ForCountLoopExpr,
ForCountLoopStmt,
ForRangeLoopExpr,
ForRangeLoopStmt,
IfExpr,
IfStmt,
WhileExpr,
WhileStmt,
)
from astx.literals import (
Literal,
LiteralBoolean,
LiteralComplex,
Expand All @@ -79,28 +73,6 @@
LiteralUInt128,
LiteralUTF8Char,
LiteralUTF8String,
Number,
SignedInteger,
Time,
Timestamp,
UInt8,
UInt16,
UInt32,
UInt64,
UInt128,
UnsignedInteger,
UTF8Char,
UTF8String,
)
from astx.flows import (
ForCountLoopExpr,
ForCountLoopStmt,
ForRangeLoopExpr,
ForRangeLoopStmt,
IfExpr,
IfStmt,
WhileExpr,
WhileStmt,
)
from astx.mixes import (
NamedExpr,
Expand All @@ -110,10 +82,6 @@
ScopeKind,
VisibilityKind,
)
from astx.operators import (
BinaryOp,
UnaryOp,
)
from astx.packages import (
AliasExpr,
ImportExpr,
Expand All @@ -126,7 +94,37 @@
Target,
)
from astx.types import (
BinaryOp,
Boolean,
Complex,
Complex32,
Complex64,
DataTypeOps,
Date,
DateTime,
Float16,
Float32,
Float64,
Floating,
Int8,
Int16,
Int32,
Int64,
Integer,
Number,
SignedInteger,
Time,
Timestamp,
TypeCastExpr,
UInt8,
UInt16,
UInt32,
UInt64,
UInt128,
UnaryOp,
UnsignedInteger,
UTF8Char,
UTF8String,
)
from astx.variables import (
InlineVariableDeclaration,
Expand Down Expand Up @@ -214,7 +212,6 @@ def get_version() -> str:
"MutabilityKind",
"NamedExpr",
"Number",
"operators",
"OperatorType",
"packages",
"Package",
Expand Down Expand Up @@ -253,6 +250,8 @@ def get_version() -> str:
"LiteralDateTime",
"LiteralTimestamp",
"LiteralTime",
"types",
"literals",
]


Expand Down
2 changes: 1 addition & 1 deletion src/astx/callables.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
Undefined,
)
from astx.blocks import Block
from astx.datatypes import AnyType
from astx.modifiers import MutabilityKind, ScopeKind, VisibilityKind
from astx.types import AnyType
from astx.variables import Variable

UNDEFINED = Undefined()
Expand Down
Loading

0 comments on commit 90e828f

Please sign in to comment.