Skip to content

Commit

Permalink
pep8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVCaron committed Nov 16, 2023
1 parent 8067716 commit 7fcddf3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions scilpy/io/deprecator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
import warnings



class ScilpyExpiredDeprecation(ExpiredDeprecationError):
pass


DEFAULT_SEPARATOR = "="
DEFAULT_DEPRECATION_WINDOW = 2 # Wait for 2 minor releases
# before forcing script removal
DEFAULT_DEPRECATION_WINDOW = 2 # Wait for 2 minor releases before rasing error

DEPRECATION_HEADER = f"""
{DEFAULT_SEPARATOR * 68}
Expand Down Expand Up @@ -45,6 +43,7 @@ class ScilpyExpiredDeprecation(ExpiredDeprecationError):
{SEPARATOR}
"""


def _separator(_msg):
_msg_width = max([len(_m) for _m in _msg.split("\n")])

Expand Down Expand Up @@ -107,5 +106,5 @@ def _wrapper(*args, **kwargs):
return _warn(_exp_version, message, func, *args, **kwargs)

return _wrapper

return _deprecation_decorator
1 change: 1 addition & 0 deletions scripts/legacy/scil_streamlines_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
tractogram.
"""


@deprecate_script("scil_streamlines_math.py", DEPRECATION_MSG, '1.5.0')
def main():
new_main()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def run(self):
entry_points={
'console_scripts': ["{}=scripts.{}:main".format(
os.path.basename(s),
os.path.basename(s).split(".")[0]) for s in SCRIPTS] + \
os.path.basename(s).split(".")[0]) for s in SCRIPTS] +
["{}=scripts.legacy.{}:main".format(
os.path.basename(s),
os.path.basename(s).split(".")[0]) for s in LEGACY_SCRIPTS]
Expand Down

0 comments on commit 7fcddf3

Please sign in to comment.