From e71b1036232151feb8dcd074429457968d8492c2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 8 Aug 2023 15:32:03 +0300 Subject: [PATCH] Style(ImportManager): Fixed `F811` warning from `flake8` Redefinition of unused 'join'. --- Cheetah/ImportManager.py | 17 +++++++++-------- docs/news.rst | 5 +++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cheetah/ImportManager.py b/Cheetah/ImportManager.py index 987ecb69..95cab96f 100644 --- a/Cheetah/ImportManager.py +++ b/Cheetah/ImportManager.py @@ -60,14 +60,15 @@ def _os_bootstrap(): elif 'mac' in names: from mac import stat, getcwd - def join(a, b): - if a == '': - return b - if ':' not in a: - a = ':' + a - if a[-1:] != ':': - a = a + ':' - return a + b + if join is None: + def join(a, b): + if a == '': + return b + if ':' not in a: + a = ':' + a + if a[-1:] != ':': + a = a + ':' + return a + b else: raise ImportError('no os specific module found') diff --git a/docs/news.rst b/docs/news.rst index 52f01c05..f737cee8 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -8,6 +8,11 @@ Bug fixes: - Fixed printing to stdout in ``CheetahWrapper``. +Code style: + + - Fixed a ``F811`` warning from ``flake8``: + redefinition of unused 'join' in ``ImportManager.py``. + CI: - CI(GHActions): Install all Python and PyPy versions from ``conda-forge``.