my.core: deprecate Path/dataclass imports from my.core during type checking
runtime still works for backwards compatibility
This commit is contained in:
parent
ac64b08915
commit
432c64ef56
10 changed files with 34 additions and 18 deletions
|
@ -1,10 +1,13 @@
|
|||
'''
|
||||
Bindings for the 'core' HPI configuration
|
||||
'''
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
import re
|
||||
from typing import Sequence, Optional
|
||||
|
||||
from . import warnings, PathIsh, Path
|
||||
from . import warnings, PathIsh
|
||||
|
||||
try:
|
||||
from my.config import core as user_config # type: ignore[attr-defined]
|
||||
|
@ -21,7 +24,6 @@ except Exception as e:
|
|||
|
||||
_HPI_CACHE_DIR_DEFAULT = ''
|
||||
|
||||
from dataclasses import dataclass
|
||||
@dataclass
|
||||
class Config(user_config):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue