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
b1963789
Commit
b1963789
authored
5 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
pydoc fix
parent
3ef06485
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
satella/instrumentation/trace_back.py
+6
-0
6 additions, 0 deletions
satella/instrumentation/trace_back.py
with
6 additions
and
0 deletions
satella/instrumentation/trace_back.py
+
6
−
0
View file @
b1963789
...
...
@@ -48,6 +48,7 @@ class GenerationPolicy(object):
repr_length_limit
:
int
=
128
*
1024
,
compression_level
:
int
=
6
):
"""
:param enable_pickling: bool, whether to enable pickling at all
:param compress_at: pickles longer than this (bytes) will be compressed
:param repr_length_limit: maximum length of __repr__. None for no limit.
...
...
@@ -72,6 +73,7 @@ class GenerationPolicy(object):
def
should_compress
(
self
,
pickledata
:
bytes
)
->
bool
:
"""
Should this pickle undergo compression?
:param pickledata: pickle value
:return: bool
"""
...
...
@@ -80,6 +82,7 @@ class GenerationPolicy(object):
def
get_compression_level
(
self
,
pickledata
:
bytes
)
->
int
:
"""
What compression level to use to pickle this?
:param pickledata: bytes, pickle value
:return: int, 1-9, where
"
1
"
is the fastest, and
"
9
"
is the slowest,
but produces best compression
...
...
@@ -89,6 +92,7 @@ class GenerationPolicy(object):
def
process_repr
(
self
,
r
:
str
)
->
str
:
"""
Process the string obtained from __repr__ing
:param r: result of a __repr__ on value
:return: processed result
"""
...
...
@@ -269,6 +273,7 @@ class Traceback(object):
"""
Return a multi-line, pretty-printed representation of all exception
data.
:return: text
"""
bio
=
io
.
StringIO
()
...
...
@@ -278,6 +283,7 @@ class Traceback(object):
def
pretty_print
(
self
,
output
:
tp
.
TextIO
=
sys
.
stderr
)
->
None
:
"""
Pretty-print the exception
:param output: a file-like object in text mode
:return: unicode
"""
...
...
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