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
Model registry
Operate
Environments
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
pycodegen
pystencils
Commits
0b14e421
Commit
0b14e421
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
remove now-unnecessary functions
parent
04fffe91
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#63214
failed
1 year ago
Stage: pretest
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mypy.ini
+3
-3
3 additions, 3 deletions
mypy.ini
src/pystencils/backend/functions.py
+0
-42
0 additions, 42 deletions
src/pystencils/backend/functions.py
with
3 additions
and
45 deletions
mypy.ini
+
3
−
3
View file @
0b14e421
...
...
@@ -5,11 +5,11 @@ exclude = "src/pystencils/old"
[mypy-pystencils.*]
ignore_errors
=
true
[mypy-pystencils.backend.*]
ignore_errors
=
False
[mypy-setuptools.*]
ignore_missing_imports
=
true
[mypy-appdirs.*]
ignore_missing_imports
=
true
[mypy-pystencils.backend.*]
ignore_errors
=
False
This diff is collapsed.
Click to expand it.
src/pystencils/backend/functions.py
+
0
−
42
View file @
0b14e421
...
...
@@ -19,8 +19,6 @@ from typing import Any, TYPE_CHECKING
from
abc
import
ABC
from
enum
import
Enum
from
.types
import
PsAbstractType
if
TYPE_CHECKING
:
from
.ast.expressions
import
PsExpression
...
...
@@ -97,43 +95,3 @@ class PsMathFunction(PsFunction):
@property
def
arg_count
(
self
)
->
int
:
return
self
.
_func
.
arg_count
class
Deref
(
PsFunction
):
"""
Dereferences a pointer.
"""
def
__init__
(
self
):
super
().
__init__
(
"
deref
"
,
1
)
deref
=
Deref
()
class
AddressOf
(
PsFunction
):
"""
Take the address of an object
"""
def
__init__
(
self
):
super
().
__init__
(
"
address_of
"
,
1
)
address_of
=
AddressOf
()
class
Cast
(
PsFunction
):
"""
An unsafe C-style type cast
"""
def
__init__
(
self
,
target_type
:
PsAbstractType
):
super
().
__init__
(
"
cast
"
,
1
)
self
.
_target_type
=
target_type
@property
def
arg_count
(
self
)
->
int
:
return
1
@property
def
target_type
(
self
)
->
PsAbstractType
:
return
self
.
_target_type
def
cast
(
target_type
:
PsAbstractType
,
arg
:
PsExpression
):
return
Cast
(
target_type
)(
arg
)
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