Skip to content

Commit

Permalink
[cdd/tests/mocks/fastapi_routes.py] Add missing type_params=[] for …
Browse files Browse the repository at this point in the history
…Python 3.12 support ; [cdd/shared/pkg_utils.py] Increase doc coverage; [cdd/shared/pure_utils.py] Export `PY_GTE_3_12` for star import
  • Loading branch information
SamuelMarks committed Oct 7, 2023
1 parent 7234341 commit f85c173
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cdd/shared/pkg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from sysconfig import get_python_version

def is_virtual_environment():
"""
Whether one is in a virtual environment
"""
return sys.base_prefix != sys.prefix or hasattr(sys, "real_prefix")

def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
Expand Down Expand Up @@ -63,7 +66,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
else:

class DistutilsPlatformError(Exception):
pass
"""DistutilsPlatformError"""

raise DistutilsPlatformError(
"I don't know where Python installs its library "
Expand Down
1 change: 1 addition & 0 deletions cdd/shared/pure_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@ def namespaced_upper_camelcase_to_pascal(s, sep="__"):
"PY3_8",
"PY_GTE_3_8",
"PY_GTE_3_9",
"PY_GTE_3_12",
"SetEncoder",
"all_dunder_for_module",
"append_to_dict",
Expand Down
1 change: 1 addition & 0 deletions cdd/tests/mocks/fastapi_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async def create_config(config: Config):
],
)
],
type_params=[],
lineno=None,
returns=None,
**maybe_type_comment
Expand Down

0 comments on commit f85c173

Please sign in to comment.