mirror of
https://github.com/yaml/pyyaml.git
synced 2025-10-19 19:13:19 +00:00
Fix issue with representing Enum types
This commit is contained in:
parent
141afddd45
commit
961ce9dcf5
4 changed files with 6 additions and 2 deletions
|
@ -369,7 +369,7 @@ Representer.add_representer(complex,
|
|||
Representer.add_representer(tuple,
|
||||
Representer.represent_tuple)
|
||||
|
||||
Representer.add_representer(type,
|
||||
Representer.add_multi_representer(type,
|
||||
Representer.represent_name)
|
||||
|
||||
Representer.add_representer(collections.OrderedDict,
|
||||
|
|
|
@ -1 +1 @@
|
|||
[str, yaml.Loader, yaml.dump, abs, yaml.tokens]
|
||||
[str, yaml.Loader, yaml.dump, abs, yaml.tokens, signal.Handlers]
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
- !!python/name:yaml.dump
|
||||
- !!python/name:abs
|
||||
- !!python/module:yaml.tokens
|
||||
- !!python/name:signal.Handlers
|
||||
|
|
|
@ -5,6 +5,9 @@ import pprint
|
|||
import datetime
|
||||
import yaml.tokens
|
||||
|
||||
# Import any packages here that need to be referenced in .code files.
|
||||
import signal
|
||||
|
||||
def execute(code):
|
||||
global value
|
||||
exec(code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue