Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
cb401867
Commit
cb401867
authored
3 years ago
by
David Hendriks
Browse files
Options
Downloads
Patches
Plain Diff
Updated docstrings
parent
0f14eeaa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#31467
passed
3 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
badges/docstring_coverage.svg
+3
-3
3 additions, 3 deletions
badges/docstring_coverage.svg
binarycpython/utils/functions.py
+6
-0
6 additions, 0 deletions
binarycpython/utils/functions.py
with
9 additions
and
3 deletions
badges/docstring_coverage.svg
+
3
−
3
View file @
cb401867
...
...
@@ -8,13 +8,13 @@
</clipPath>
<g
clip-path=
"url(#r)"
>
<rect
width=
"99"
height=
"20"
fill=
"#555"
/>
<rect
x=
"99"
width=
"43"
height=
"20"
fill=
"#
dfb317
"
/>
<rect
x=
"99"
width=
"43"
height=
"20"
fill=
"#
4c1
"
/>
<rect
width=
"142"
height=
"20"
fill=
"url(#s)"
/>
</g>
<g
fill=
"#fff"
text-anchor=
"middle"
font-family=
"Verdana,Geneva,DejaVu Sans,sans-serif"
font-size=
"110"
>
<text
x=
"505"
y=
"150"
fill=
"#010101"
fill-opacity=
".3"
transform=
"scale(.1)"
textLength=
"890"
>
docstr-coverage
</text>
<text
x=
"505"
y=
"140"
transform=
"scale(.1)"
textLength=
"890"
>
docstr-coverage
</text>
<text
x=
"1195"
y=
"150"
fill=
"#010101"
fill-opacity=
".3"
transform=
"scale(.1)"
>
74
%
</text>
<text
x=
"1195"
y=
"140"
transform=
"scale(.1)"
>
74
%
</text>
<text
x=
"1195"
y=
"150"
fill=
"#010101"
fill-opacity=
".3"
transform=
"scale(.1)"
>
98
%
</text>
<text
x=
"1195"
y=
"140"
transform=
"scale(.1)"
>
98
%
</text>
</g>
</svg>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
binarycpython/utils/functions.py
+
6
−
0
View file @
cb401867
...
...
@@ -253,10 +253,12 @@ class catchtime(object):
"""
def
__enter__
(
self
):
"""
On entry we start the clock
"""
self
.
t
=
time
.
clock
()
return
self
def
__exit__
(
self
,
type
,
value
,
traceback
):
"""
On exit we stop the clock and measure the time spent
"""
self
.
t
=
time
.
clock
()
-
self
.
t
print
(
"
Took {}s
"
.
format
(
self
.
t
))
...
...
@@ -276,11 +278,15 @@ class Capturing(list):
"""
def
__enter__
(
self
):
"""
On entry we capture the stdout output
"""
self
.
_stdout
=
sys
.
stdout
sys
.
stdout
=
self
.
_stringio
=
StringIO
()
return
self
def
__exit__
(
self
,
*
args
):
"""
On exit we release the capture again
"""
self
.
extend
(
self
.
_stringio
.
getvalue
().
splitlines
())
del
self
.
_stringio
# free up some memory
sys
.
stdout
=
self
.
_stdout
...
...
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