This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Patch ``dataclasses`` to support optional after required fields. | |
Fields used in ``__init__`` without defaults are currently not allowed | |
after fields with defaults, due to the specification in PEP 557. This | |
patch allows these fields, but makes them required keyword-only | |
parameters to ``__init__``. | |
To apply this patch, simply import this module before defining any | |
dataclasses. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def uncache(exclude): | |
"""Remove package modules from cache except excluded ones. | |
On next import they will be reloaded. | |
Args: | |
exclude (iter<str>): Sequence of module paths. | |
""" | |
pkgs = [] |