mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-09 19:13:14 -06:00
chore: cleanup some types on standalone functions
This commit is contained in:
parent
bfc2592925
commit
454349ea23
3 changed files with 12 additions and 9 deletions
|
@ -91,9 +91,10 @@ It can be auto-generated with for example: `viv freeze <spec> --standalone`.
|
||||||
|
|
||||||
The only part necessary to modify if copied verbatim from below is the call to `_viv_use`.
|
The only part necessary to modify if copied verbatim from below is the call to `_viv_use`.
|
||||||
|
|
||||||
output of `viv freeze rich --standalone`:
|
Output of `viv freeze rich --standalone`:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# <<<<< auto-generated by daylinmorgan/viv (v.22.12a3)
|
# <<<<< auto-generated by daylinmorgan/viv (v22.12a3-35-g0d0c66d-dev)
|
||||||
# fmt: off
|
# fmt: off
|
||||||
def _viv_use(*pkgs: str, track_exe: bool = False, name: str = "") -> None: # noqa
|
def _viv_use(*pkgs: str, track_exe: bool = False, name: str = "") -> None: # noqa
|
||||||
i,s,m,e,spec=__import__,str,map,lambda x: True if x else False,[*pkgs] # noqa
|
i,s,m,e,spec=__import__,str,map,lambda x: True if x else False,[*pkgs] # noqa
|
||||||
|
@ -116,6 +117,8 @@ def _viv_use(*pkgs: str, track_exe: bool = False, name: str = "") -> None:
|
||||||
_viv_use("markdown-it-py==2.2.0", "mdurl==0.1.2", "Pygments==2.14.0", "rich==13.3.2") # noqa
|
_viv_use("markdown-it-py==2.2.0", "mdurl==0.1.2", "Pygments==2.14.0", "rich==13.3.2") # noqa
|
||||||
# fmt: on
|
# fmt: on
|
||||||
# >>>>> code golfed with <3
|
# >>>>> code golfed with <3
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Alternatives
|
## Alternatives
|
||||||
|
|
|
@ -5,7 +5,7 @@ With this function it's not necessary for
|
||||||
`viv` to exist anywhere on the system.
|
`viv` to exist anywhere on the system.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# <<<<< auto-generated by daylinmorgan/viv (v.22.12a3)
|
# <<<<< auto-generated by daylinmorgan/viv (v22.12a3-35-g0d0c66d-dev)
|
||||||
# fmt: off
|
# fmt: off
|
||||||
def _viv_use(*pkgs: str, track_exe: bool = False, name: str = "") -> None: # noqa
|
def _viv_use(*pkgs: str, track_exe: bool = False, name: str = "") -> None: # noqa
|
||||||
i,s,m,e,spec=__import__,str,map,lambda x: True if x else False,[*pkgs] # noqa
|
i,s,m,e,spec=__import__,str,map,lambda x: True if x else False,[*pkgs] # noqa
|
||||||
|
|
|
@ -30,7 +30,7 @@ from pathlib import Path
|
||||||
from textwrap import dedent, wrap
|
from textwrap import dedent, wrap
|
||||||
from typing import Dict, List, Tuple
|
from typing import Dict, List, Tuple
|
||||||
|
|
||||||
__version__ = "22.12a3-35-g0d0c66d-dev"
|
__version__ = "22.12a3-37-gbfc2592-dev"
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -477,7 +477,7 @@ REL_SYS_PATH_TEMPLATE = (
|
||||||
IMPORT_TEMPLATE = """__import__("viv").use({spec}) # noqa"""
|
IMPORT_TEMPLATE = """__import__("viv").use({spec}) # noqa"""
|
||||||
|
|
||||||
STANDALONE_TEMPLATE = r"""
|
STANDALONE_TEMPLATE = r"""
|
||||||
# <<<<< auto-generated by daylinmorgan/viv (v.22.12a3)
|
# <<<<< auto-generated by daylinmorgan/viv v{version}
|
||||||
# fmt: off
|
# fmt: off
|
||||||
{use}
|
{use}
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
Loading…
Reference in a new issue