Skip to content

Commit

Permalink
Fixed linting, import sorting and unrelated mypy error (due to deprec…
Browse files Browse the repository at this point in the history
…ated method)
  • Loading branch information
sveinugu committed Oct 6, 2023
1 parent a6d746a commit d4a405e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/datatypes/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ def get_chunk(self, trans, dataset: HasFileName, offset: int = 0, ck_size: Optio
break

offset = bamfile.tell()
bamline = alignment.tostring(bamfile)
bamline = alignment.to_string()
# With multiple tags, Galaxy would display each as a separate column
# because the 'tostring()' function uses tabs also between tags.
# Below code will turn these extra tabs into spaces.
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@
from galaxy.util import (
directory_hash_id,
enum_values,
hex_to_lowercase_alphanum,
listify,
ready_name_for_url,
unicodify,
unique_id,
hex_to_lowercase_alphanum,
)
from galaxy.util.dictifiable import (
dict_for,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
Create Date: 2023-10-05 02:09:32.888292
"""
from sqlalchemy import Column, Text, Boolean
from sqlalchemy import (
Boolean,
Column,
Text,
)

from galaxy.model.migrations.util import (
add_column,
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/security/idencoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

import galaxy.exceptions
from galaxy.util import (
smart_str,
unicodify,
hex_to_lowercase_alphanum,
lowercase_alphanum_to_hex,
smart_str,
unicodify,
)

log = logging.getLogger(__name__)
Expand Down
4 changes: 3 additions & 1 deletion lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,7 @@ def hex_to_lowercase_alphanum(hex_string: str) -> str:
characters a-z and 0-9
"""
import numpy as np

return np.base_repr(int(hex_string, 16), 36).lower()


Expand All @@ -1899,4 +1900,5 @@ def lowercase_alphanum_to_hex(lowercase_alphanum: str) -> str:
hexadecimal string
"""
import numpy as np
return np.base_repr(int(lowercase_alphanum, 36), 16).lower()

return np.base_repr(int(lowercase_alphanum, 36), 16).lower()

0 comments on commit d4a405e

Please sign in to comment.