mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
pre-commit autoupdate and fix new issues pointed out by ruff
This commit is contained in:
parent
0da2530d9b
commit
075542721c
4 changed files with 7 additions and 8 deletions
|
|
@ -87,7 +87,7 @@ _DEFAULT_PATH = _DEFAULT_PATH_TYPE(os.curdir)
|
|||
|
||||
|
||||
def ask(question, answer=str, default=None, length=None):
|
||||
if answer == str:
|
||||
if answer is str:
|
||||
r = ""
|
||||
while True:
|
||||
if default:
|
||||
|
|
@ -110,7 +110,7 @@ def ask(question, answer=str, default=None, length=None):
|
|||
|
||||
return r
|
||||
|
||||
elif answer == bool:
|
||||
elif answer is bool:
|
||||
r = None
|
||||
while True:
|
||||
if default is True:
|
||||
|
|
@ -134,7 +134,7 @@ def ask(question, answer=str, default=None, length=None):
|
|||
else:
|
||||
print("You must answer 'yes' or 'no'")
|
||||
return r
|
||||
elif answer == int:
|
||||
elif answer is int:
|
||||
r = None
|
||||
while True:
|
||||
if default:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ except ImportError:
|
|||
)
|
||||
|
||||
|
||||
global _THEMES_PATH
|
||||
_THEMES_PATH = os.path.join(
|
||||
os.path.dirname(os.path.abspath(pelican.__file__)), "themes"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue