Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
public
satella
Commits
fbfef43e
Commit
fbfef43e
authored
7 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
typechk for instmethods
parent
27862e6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/coding/typechecking.md
+13
-1
13 additions, 1 deletion
docs/coding/typechecking.md
with
13 additions
and
1 deletion
docs/coding/typechecking.md
+
13
−
1
View file @
fbfef43e
...
@@ -5,4 +5,16 @@ Satella typechecking is a complex solution for:
...
@@ -5,4 +5,16 @@ Satella typechecking is a complex solution for:
*
checking type compatibility at runtime
*
checking type compatibility at runtime
If you do
`@typed`
on a class method, skip the type of self or cls, since Satella will
If you do
`@typed`
on a class method, skip the type of self or cls, since Satella will
detect that it's annotating a class method.
detect that it's annotating a class method.
\ No newline at end of file
## Typechecking instance methods
If you need to use
`@typed`
for instancemethods, do the following:
```
python
class
Cheese
(
object
):
@typed
(
'
self
'
,
int
,
int
):
def
add_two_ints
(
self
,
a
,
b
):
return
a
+
b
```
\ No newline at end of file
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