From 6b8f72d09fb42173a895b00197fa1fb86009fc2f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 16 Jun 2024 02:12:30 +0300 Subject: [PATCH] Feat(Python3): Rename `html` to `html_output` Do not shadow a module from the stdlib. --- html/.gitignore | 2 -- html_output/.gitignore | 2 ++ {html => html_output}/HTTPResponse.py | 0 {html => html_output}/Makefile | 2 +- {html => html_output}/Redirect.py | 0 {html => html_output}/__init__.py | 0 html/html.tmpl => html_output/html_output.tmpl | 2 +- {html => html_output}/redirect.tmpl | 2 +- {html => html_output}/response.py | 4 ++-- search-tags.py | 2 +- 10 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 html/.gitignore create mode 100644 html_output/.gitignore rename {html => html_output}/HTTPResponse.py (100%) rename {html => html_output}/Makefile (88%) rename {html => html_output}/Redirect.py (100%) rename {html => html_output}/__init__.py (100%) rename html/html.tmpl => html_output/html_output.tmpl (96%) rename {html => html_output}/redirect.tmpl (76%) rename {html => html_output}/response.py (89%) diff --git a/html/.gitignore b/html/.gitignore deleted file mode 100644 index f878ca4..0000000 --- a/html/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/html.py -/redirect.py diff --git a/html_output/.gitignore b/html_output/.gitignore new file mode 100644 index 0000000..fd9c047 --- /dev/null +++ b/html_output/.gitignore @@ -0,0 +1,2 @@ +/html_output.py +/redirect.py diff --git a/html/HTTPResponse.py b/html_output/HTTPResponse.py similarity index 100% rename from html/HTTPResponse.py rename to html_output/HTTPResponse.py diff --git a/html/Makefile b/html_output/Makefile similarity index 88% rename from html/Makefile rename to html_output/Makefile index 9d43041..070b147 100644 --- a/html/Makefile +++ b/html_output/Makefile @@ -8,4 +8,4 @@ exec python3 -m compileall $@ .PHONY: all -all: html.py redirect.py +all: html_output.py redirect.py diff --git a/html/Redirect.py b/html_output/Redirect.py similarity index 100% rename from html/Redirect.py rename to html_output/Redirect.py diff --git a/html/__init__.py b/html_output/__init__.py similarity index 100% rename from html/__init__.py rename to html_output/__init__.py diff --git a/html/html.tmpl b/html_output/html_output.tmpl similarity index 96% rename from html/html.tmpl rename to html_output/html_output.tmpl index 9d46413..5701941 100644 --- a/html/html.tmpl +++ b/html_output/html_output.tmpl @@ -1,5 +1,5 @@ #encoding koi8-r -#extends HTTPResponse +#extends html_output.HTTPResponse #implements respond diff --git a/html/redirect.tmpl b/html_output/redirect.tmpl similarity index 76% rename from html/redirect.tmpl rename to html_output/redirect.tmpl index 02f3f37..97c2cef 100644 --- a/html/redirect.tmpl +++ b/html_output/redirect.tmpl @@ -1,4 +1,4 @@ -#extends Redirect +#extends html_output.Redirect #implements respond

Moved

diff --git a/html/response.py b/html_output/response.py similarity index 89% rename from html/response.py rename to html_output/response.py index adfea5e..9b0a0ab 100644 --- a/html/response.py +++ b/html_output/response.py @@ -2,8 +2,8 @@ import sys def response(title, body, status=None): - from .html import html - result = html() + from .html_output import html_output + result = html_output() result.title = title result.body = body diff --git a/search-tags.py b/search-tags.py index fec3705..2a0a0fa 100755 --- a/search-tags.py +++ b/search-tags.py @@ -11,7 +11,7 @@ import sys from lark import ParseError import mycgi -from html.response import redirect, response +from html_output.response import redirect, response from parser import parser form = mycgi.Form() -- 2.39.2