'Contents' is a better name than 'view'.
This commit is contained in:
parent
428fad7903
commit
e44f730e74
1 changed files with 3 additions and 3 deletions
6
tools.py
6
tools.py
|
|
@ -210,14 +210,14 @@ def metadata(path):
|
||||||
metadata.dependencies = {"file", "coreutils"}
|
metadata.dependencies = {"file", "coreutils"}
|
||||||
|
|
||||||
|
|
||||||
def view(path):
|
def contents(path):
|
||||||
root, ext = splitext(path)
|
root, ext = splitext(path)
|
||||||
if ext == "":
|
if ext == "":
|
||||||
with open(path) as file_:
|
with open(path) as file_:
|
||||||
return Status.normal, fill3.Text(file_.read())
|
return Status.normal, fill3.Text(file_.read())
|
||||||
else:
|
else:
|
||||||
return pygments_(path)
|
return pygments_(path)
|
||||||
view.dependencies = {"python3-pygments"}
|
contents.dependencies = {"python3-pygments"}
|
||||||
|
|
||||||
|
|
||||||
def _is_python_syntax_correct(path, python_version):
|
def _is_python_syntax_correct(path, python_version):
|
||||||
|
|
@ -562,7 +562,7 @@ flog.dependencies = set()
|
||||||
|
|
||||||
|
|
||||||
def generic_tools():
|
def generic_tools():
|
||||||
return [view, metadata]
|
return [contents, metadata]
|
||||||
|
|
||||||
|
|
||||||
def tools_for_extension():
|
def tools_for_extension():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue