+2024-03-11 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool.py: Tweak last commit.
+ * pygnulib/GLEmiter.py (_eliminate_NMD): Don't add an extra newline when
+ the result should be empty.
+
2024-03-11 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 53.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# Allow the use of union type specifiers, using the syntax Type1 | Type2,
+# in Python ≥ 3.7. Cf. <https://docs.python.org/3/library/__future__.html>
+# and <https://stackoverflow.com/questions/73879925/>.
from __future__ import annotations
+
#===============================================================================
# Define global imports
#===============================================================================
line = _eliminate_NMD_from_line(line, automake_subdir)
if line != None:
result.append(line)
- return '\n'.join(result) + '\n'
+ if len(result) > 0:
+ return '\n'.join(result) + '\n'
+ else:
+ return ''
#===============================================================================