Skip to content

Commit 38caaab

Browse files
committed
fixed support for Python 3.9
1 parent c0659af commit 38caaab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nameof/nameof.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import inspect
22
import ast
3-
from typing import Any
3+
from typing import Any, Union
44
import os
55

6-
def nameof(var: Any, wrap_in_chars: str = "", replace_with_whitespace: str | list[str] = [] ) -> str:
6+
def nameof(var: Any, wrap_in_chars: str = "", replace_with_whitespace: Union[str, list[str]] = [] ) -> str:
77
"""
88
Returns the name of the variable or attribute passed as the first argument.
99

0 commit comments

Comments
 (0)