Skip to content

Commit 328dce0

Browse files
authored
Merge pull request #43 from apache/main
Merge main
2 parents ab06005 + 1e82e71 commit 328dce0

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

pelican/migration/generate_settings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def generate_settings(source_yaml, settings_path, builtin_p_paths=None, sourcepa
4040
if os.path.isfile(asfyaml):
4141
print(".asf.yaml detected, reading...")
4242
adata = yaml.safe_load(open(asfyaml))
43+
else:
44+
adata = None # ensure the variable is defined
4345

4446
print(f"Reading {source_yaml} in {sourcepath}")
4547
ydata = yaml.safe_load(open(source_yaml))
@@ -172,7 +174,7 @@ def generate_settings(source_yaml, settings_path, builtin_p_paths=None, sourcepa
172174
t = ezt.Template(os.path.join(THIS_DIR, AUTO_SETTINGS_TEMPLATE))
173175
t.generate(open(settings_path, "w+"), tdata)
174176

175-
if __name__ == "__main__":
177+
def main():
176178
parser = argparse.ArgumentParser(description="Convert pelicanconf.yaml to pelicanconf.py")
177179
parser.add_argument('-y', '--yaml', required=True, help="Pelicanconf YAML file")
178180
args = parser.parse_args()
@@ -186,3 +188,6 @@ def generate_settings(source_yaml, settings_path, builtin_p_paths=None, sourcepa
186188
settings_path = os.path.join(sourcepath, AUTO_SETTINGS)
187189
builtin_plugins = os.path.join(tool_dir, os.pardir, "plugins")
188190
generate_settings(pelconf_yaml, settings_path, [builtin_plugins], sourcepath)
191+
192+
if __name__ == "__main__":
193+
main()

pelican/plugins/md_inline_extension/inline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
and allows for customized inline HTML
77
"""
88

9+
# mypy: ignore-errors
10+
911
import sys
1012

1113
from pelican import signals

pelican/plugins/md_inline_extension/pelican_inline_markdown_extension.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
the Pelican Python static site generator to add inline patterns.
77
"""
88

9+
# pylint: skip-file
10+
911
import markdown
1012
import re
1113

0 commit comments

Comments
 (0)