eric7/DebugClients/Python/coverage/tomlconfig.py

branch
eric7
changeset 8527
2bd1325d727e
parent 8312
800c432b34c8
child 8775
0802ae193343
--- a/eric7/DebugClients/Python/coverage/tomlconfig.py	Fri Aug 20 19:56:17 2021 +0200
+++ b/eric7/DebugClients/Python/coverage/tomlconfig.py	Sat Aug 21 14:21:44 2021 +0200
@@ -11,6 +11,12 @@
 from coverage.backward import configparser, path_types
 from coverage.misc import CoverageException, substitute_variables
 
+# TOML support is an install-time extra option.
+try:
+    import toml
+except ImportError:         # pragma: not covered
+    toml = None
+
 
 class TomlDecodeError(Exception):
     """An exception class that exists even when toml isn't installed."""
@@ -29,8 +35,6 @@
         self.data = None
 
     def read(self, filenames):
-        from coverage.optional import toml
-
         # RawConfigParser takes a filename or list of filenames, but we only
         # ever call this with a single filename.
         assert isinstance(filenames, path_types)

eric ide

mercurial