Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hyteg
pystencils
Commits
c1fd9519
Commit
c1fd9519
authored
1 year ago
by
Daniel Bauer
Browse files
Options
Downloads
Patches
Plain Diff
improve error messages
parent
23e7a9bb
No related branches found
No related tags found
No related merge requests found
Pipeline
#64790
failed
1 year ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pystencils/backend/symbols.py
+3
-1
3 additions, 1 deletion
src/pystencils/backend/symbols.py
src/pystencils/types/basic_types.py
+1
-1
1 addition, 1 deletion
src/pystencils/types/basic_types.py
with
4 additions
and
2 deletions
src/pystencils/backend/symbols.py
+
3
−
1
View file @
c1fd9519
...
@@ -42,7 +42,9 @@ class PsSymbol:
...
@@ -42,7 +42,9 @@ class PsSymbol:
def
get_dtype
(
self
)
->
PsType
:
def
get_dtype
(
self
)
->
PsType
:
if
self
.
_dtype
is
None
:
if
self
.
_dtype
is
None
:
raise
PsInternalCompilerError
(
"
Symbol had no type assigned yet
"
)
raise
PsInternalCompilerError
(
f
"
Symbol
{
self
.
name
}
had no type assigned yet
"
)
return
self
.
_dtype
return
self
.
_dtype
def
__eq__
(
self
,
other
:
object
)
->
bool
:
def
__eq__
(
self
,
other
:
object
)
->
bool
:
...
...
This diff is collapsed.
Click to expand it.
src/pystencils/types/basic_types.py
+
1
−
1
View file @
c1fd9519
...
@@ -655,7 +655,7 @@ class PsIeeeFloatType(PsScalarType):
...
@@ -655,7 +655,7 @@ class PsIeeeFloatType(PsScalarType):
def
__init__
(
self
,
width
:
int
,
const
:
bool
=
False
):
def
__init__
(
self
,
width
:
int
,
const
:
bool
=
False
):
if
width
not
in
self
.
SUPPORTED_WIDTHS
:
if
width
not
in
self
.
SUPPORTED_WIDTHS
:
raise
ValueError
(
raise
ValueError
(
f
"
Invalid integer width; must be one of
{
self
.
SUPPORTED_WIDTHS
}
.
"
f
"
Invalid integer width
{
width
}
; must be one of
{
self
.
SUPPORTED_WIDTHS
}
.
"
)
)
super
().
__init__
(
const
)
super
().
__init__
(
const
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment