Skip to content

Commit 72810f5

Browse files
adding removed comments back
1 parent ea8aa94 commit 72810f5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

apertium_apy/handlers/list_modes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from apertium_apy.handlers.base import BaseHandler
44
from apertium_apy.utils import to_alpha2_code
55

6+
67
class ListHandler(BaseHandler):
78
@tornado.gen.coroutine
89
def get(self):

apertium_apy/mode_search.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
if False:
1212
from typing import Dict, List, Tuple # noqa: F401
1313

14+
1415
def is_loop(dirpath, rootpath, real_root=None):
1516
if os.path.islink(dirpath):
17+
# We just descended into a directory via a symbolic link
18+
# Check if we're referring to a directory that is
19+
# a parent of our nominal directory
1620
if not real_root:
1721
real_root = os.path.abspath(os.path.realpath(rootpath))
1822
relative = os.path.relpath(dirpath, rootpath)
@@ -26,6 +30,7 @@ def is_loop(dirpath, rootpath, real_root=None):
2630
else:
2731
return False
2832

33+
2934
def search_voikko_paths(voikko_path='~/.voikko/3'):
3035
voikko_path = os.path.expanduser(voikko_path)
3136
voikko_modes = []
@@ -97,6 +102,7 @@ def search_path(rootpath, include_pairs=True, verbosity=1):
97102

98103
return modes
99104

105+
100106
def search_prefs(rootpath):
101107
if etree is None:
102108
logging.warning('Please install python3-lxml to enable /pairprefs endpoint')
@@ -118,6 +124,7 @@ def search_prefs(rootpath):
118124
logging.warning('Exception on parsing preferences file {}'.format(fp))
119125
return pairprefs
120126

127+
121128
def _log_modes(modes):
122129
"""Print given modes to log."""
123130
for mtype in modes:

0 commit comments

Comments
 (0)