Skip to content

Commit 23ec7cb

Browse files
author
Brian Kohan
committed
tweaks for coverage
1 parent bab95d0 commit 23ec7cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

django_typer/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,8 +2950,6 @@ def __getattr__(self, name: str) -> t.Any:
29502950
and return that command or group if the attribute name matches the command/group
29512951
function OR its registered CLI name.
29522952
"""
2953-
if isinstance(attr := getattr(self.__class__, name, None), property):
2954-
return t.cast(t.Callable, attr.fget)(self)
29552953
init = getattr(
29562954
self.typer_app.registered_callback,
29572955
"callback",

django_typer/tests/test_interface.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def sqrt(self):
310310
pass
311311

312312
def test_attribute_access_outside_of_definition(self):
313-
from django_typer import TyperCommand
313+
from django_typer import TyperCommand, TyperCommandMeta
314314
from django_typer.tests.apps.test_app.management.commands.native import app
315315

316316
with self.assertRaises(AttributeError):
@@ -321,3 +321,6 @@ def sqrt():
321321

322322
with self.assertRaises(AttributeError):
323323
TyperCommand.maths
324+
325+
with self.assertRaises(AttributeError):
326+
TyperCommandMeta.maths

0 commit comments

Comments
 (0)