8000 Move deprecated functions to bottom of source file · scijava/scyjava@69ff2c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 69ff2c3

Browse files
committed
Move deprecated functions to bottom of source file
1 parent dad2b2a commit 69ff2c3

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/scyjava/config.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,6 @@ class Mode(_enum.Enum):
3737
mode = Mode.JPYPE
3838

3939

40-
def add_endpoints(*new_endpoints):
41-
"""
42-
DEPRECATED since v1.2.1
43-
Please modify the endpoints field directly instead.
44-
"""
45-
_logger.warning(
46-
"Deprecated method call: scyjava.config.add_endpoints(). "
47-
"Please modify scyjava.config.endpoints directly instead."
48-
)
49-
global endpoints
50-
_logger.debug("Adding endpoints %s to %s", new_endpoints, endpoints)
51-
endpoints.extend(new_endpoints)
52-
53-
54-
def get_endpoints():
55-
"""
56-
DEPRECATED since v1.2.1
57-
Please access the endpoints field directly instead.
58-
"""
59-
_logger.warning(
60-
"Deprecated method call: scyjava.config.get_endpoints(). "
61-
"Please access scyjava.config.endpoints directly instead."
62-
)
63-
global endpoints
64-
return endpoints
65-
66-
6740
def add_repositories(*args, **kwargs) -> None:
6841
"""
6942
Add one or more Maven repositories to be used by jgo for downloading dependencies.
@@ -358,3 +331,30 @@ def get_shortcuts() -> dict[str, str]:
358331
"""
359332
global _shortcuts
360333
return _shortcuts
334+
335+
336+
def add_endpoints(*new_endpoints):
337+
"""
338+
DEPRECATED since v1.2.1
339+
Please modify the endpoints field directly instead.
340+
"""
341+
_logger.warning(
342+
"Deprecated method call: scyjava.config.add_endpoints(). "
343+
"Please modify scyjava.config.endpoints directly instead."
344+
)
345+
global endpoints
346+
_logger.debug("Adding endpoints %s to %s", new_endpoints, endpoints)
347+
endpoints.extend(new_endpoints)
348+
349+
350+
def get_endpoints():
351+
"""
352+
DEPRECATED since v1.2.1
353+
Please access the endpoints field directly instead.
354+
"""
355+
_logger.warning(
356+
"Deprecated method call: scyjava.config.get_endpoints(). "
357+
"Please access scyjava.config.endpoints directly instead."
358+
)
359+
global endpoints
360+
return endpoints

0 commit comments

Comments
 (0)
0