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
aab258e4
Commit
aab258e4
authored
1 year ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
v2.25.1 - added arguments to EmptyContextManager
parent
1d8f0079
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+2
-13
2 additions, 13 deletions
CHANGELOG.md
satella/__init__.py
+1
-1
1 addition, 1 deletion
satella/__init__.py
satella/coding/ctxt_managers.py
+5
-0
5 additions, 0 deletions
satella/coding/ctxt_managers.py
tests/test_coding/test_debug.py
+1
-1
1 addition, 1 deletion
tests/test_coding/test_debug.py
with
9 additions
and
15 deletions
CHANGELOG.md
+
2
−
13
View file @
aab258e4
# v2.25.
0
# v2.25.
1
*
added safe_listdir
*
added parameters for EmptyContextManager
*
fixed a bug occurring in Python 3.10 with whereis
*
DirectorySource will raise an exception if directory does not exist and on_fail is set to RAISE
Build system
============
*
Python 3.6 support dropped as it does not employ pyproject.toml, which is necessary
to build this
*
fixed unit tests to run on Py3.12
*
removed Docker unit tests
*
a unit test had some problems running under PyPy
This diff is collapsed.
Click to expand it.
satella/__init__.py
+
1
−
1
View file @
aab258e4
__version__
=
'
2.25.
0
'
__version__
=
'
2.25.
1
'
This diff is collapsed.
Click to expand it.
satella/coding/ctxt_managers.py
+
5
−
0
View file @
aab258e4
...
@@ -9,8 +9,13 @@ class EmptyContextManager:
...
@@ -9,8 +9,13 @@ class EmptyContextManager:
>>>
ctxt
=
EmptyContextManager
()
>>>
ctxt
=
EmptyContextManager
()
>>>
with
ctxt
:
>>>
with
ctxt
:
>>>
...
>>>
...
Note that it will accept any parameters, and then throw them on the ground.
"""
"""
def
__init__
(
self
,
*
args
,
**
kwargs
):
pass
def
__enter__
(
self
):
def
__enter__
(
self
):
return
self
return
self
...
...
This diff is collapsed.
Click to expand it.
tests/test_coding/test_debug.py
+
1
−
1
View file @
aab258e4
...
@@ -9,7 +9,7 @@ from satella.exceptions import PreconditionError
...
@@ -9,7 +9,7 @@ from satella.exceptions import PreconditionError
class
TestTypecheck
(
unittest
.
TestCase
):
class
TestTypecheck
(
unittest
.
TestCase
):
def
test_empty_ctxt_manager
(
self
):
def
test_empty_ctxt_manager
(
self
):
with
EmptyContextManager
()
as
p
:
with
EmptyContextManager
(
1
,
2
)
as
p
:
pass
pass
def
test_except_exception
(
self
):
def
test_except_exception
(
self
):
...
...
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