From 38febf942912f85ea48fbc6e359068cc44551316 Mon Sep 17 00:00:00 2001 From: Kyle Bowman Date: Sun, 24 Mar 2024 14:55:52 -0400 Subject: [PATCH] Refactor: Change filenames to command/infer. --- src/proto/__init__.py | 2 +- src/proto/{prototype.py => command.py} | 2 +- src/proto/{utils.py => infer.py} | 0 tests/{test_proto.py => test_command.py} | 0 tests/{test_utils.py => test_infer.py} | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) rename src/proto/{prototype.py => command.py} (95%) rename src/proto/{utils.py => infer.py} (100%) rename tests/{test_proto.py => test_command.py} (100%) rename tests/{test_utils.py => test_infer.py} (97%) diff --git a/src/proto/__init__.py b/src/proto/__init__.py index 85846f2..4e0fee2 100644 --- a/src/proto/__init__.py +++ b/src/proto/__init__.py @@ -1,3 +1,3 @@ -from proto.prototype import Command, command +from proto.command import Command, command __all__ = ['Command', 'command'] \ No newline at end of file diff --git a/src/proto/prototype.py b/src/proto/command.py similarity index 95% rename from src/proto/prototype.py rename to src/proto/command.py index 27609bb..29bfba9 100644 --- a/src/proto/prototype.py +++ b/src/proto/command.py @@ -2,7 +2,7 @@ from argparse import ArgumentError from collections.abc import Callable from functools import partial from typing import Optional -from proto.utils import get_defaults, get_types, get_parser +from proto.infer import get_defaults, get_types, get_parser class Command: diff --git a/src/proto/utils.py b/src/proto/infer.py similarity index 100% rename from src/proto/utils.py rename to src/proto/infer.py diff --git a/tests/test_proto.py b/tests/test_command.py similarity index 100% rename from tests/test_proto.py rename to tests/test_command.py diff --git a/tests/test_utils.py b/tests/test_infer.py similarity index 97% rename from tests/test_utils.py rename to tests/test_infer.py index e1b8af0..8e42f7b 100644 --- a/tests/test_utils.py +++ b/tests/test_infer.py @@ -5,7 +5,7 @@ from typing import Optional import pytest from dummy import * -from proto.utils import get_defaults, get_types, get_parser +from proto.infer import get_defaults, get_types, get_parser def test_get_default_equivalence(): """ Ensures that defaults are treated the same amongst Callables. """ @@ -128,7 +128,7 @@ if __name__ == "__main__": sig2=inspect.signature(dummy_fn_file) p3 = sig2.parameters['filename'] - from test_proto import Stringable + from tests.test_command import Stringable def echo(arg: Stringable): return str(arg) sig3 = inspect.signature(echo) -- 2.39.5