Skip to content

Commit e5ae63c

Browse files
committed
Set DefaultVirtualenvConfig.venv_config to None when creating the class instance.
Fixes #33 Signed-off-by: Pedro Algarvio <[email protected]>
1 parent 34e7630 commit e5ae63c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog/33.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Set `DefaultVirtualenvConfig.venv_config` to `None` when creating the class instance.

src/ptscripts/parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,15 @@ class DefaultVirtualenvConfig:
267267
"""
268268

269269
_instance: DefaultVirtualenvConfig | None = None
270-
venv_config: VirtualEnvConfig
270+
venv_config: VirtualEnvConfig | None
271271

272272
def __new__(cls):
273273
"""
274274
Method that instantiates a singleton class and returns it.
275275
"""
276276
if cls._instance is None:
277277
instance = super().__new__(cls)
278+
instance.venv_config = None
278279
cls._instance = instance
279280
return cls._instance
280281

0 commit comments

Comments
 (0)