diff --git a/tests/functional/r/regression_02/regression_3979.py b/tests/functional/r/regression_02/regression_3979.py new file mode 100644 index 0000000000..b48661bc3f --- /dev/null +++ b/tests/functional/r/regression_02/regression_3979.py @@ -0,0 +1,13 @@ +""" +Regression test for https://github.com/PyCQA/pylint/issues/3979 +""" + +import os +from typing import TYPE_CHECKING, Any, Union + +if TYPE_CHECKING: + BasePathLike = os.PathLike[Any] # <-- that is where pylint identifies E1136 +else: + BasePathLike = os.PathLike + +foo : Union[str, BasePathLike] = "bar"