Skip to content

Commit

Permalink
Switch from naturalsort to natsort
Browse files Browse the repository at this point in the history
pyocd/commands/commands.py:
Use natsort's `natsorted()` instead of naturalsort's `natsort()`.

setup.cfg:
Replace naturalsort with natsort.

Fixes pyocd#1317
  • Loading branch information
dvzrv committed Jan 21, 2022
1 parent 7d164d9 commit 8f64dc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyocd/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import logging
import os
from natsort import natsort
from natsort import natsorted
import textwrap
from time import sleep
from shutil import get_terminal_size
Expand Down Expand Up @@ -116,7 +116,7 @@ def execute(self):

class RegisterCommandBase(CommandBase):
def dump_register_group(self, group_name):
regs = natsort(self.context.selected_core.core_registers.iter_matching(
regs = natsorted(self.context.selected_core.core_registers.iter_matching(
lambda r: r.group == group_name), key=lambda r: r.name)
reg_values = self.context.selected_core.read_core_registers_raw(r.name for r in regs)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install_requires =
hidapi>=0.10.1,<1.0; platform_system != "Linux"
intelhex>=2.0,<3.0
intervaltree>=3.0.2,<4.0
naturalsort>=1.5,<2.0
natsort>=8.0.0,<9.0
prettytable>=2.0,<3.0
pyelftools<1.0
pylink-square>=0.11.1,<1.0
Expand Down

0 comments on commit 8f64dc9

Please sign in to comment.