Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let
];

propagatedBuildInputs = with pkgs; [
segger-jlink libusb
segger-jlink libusb1
];

installPhase = ''
Expand Down Expand Up @@ -74,7 +74,9 @@ let
});
in pkgs.python3Packages.buildPythonPackage rec {
pname = "tockloader";
version = "1.10.0";
version = let
pattern = "^__version__ = ['\"]([^'\"]*)['\"]\n";
in elemAt (match pattern (readFile ./tockloader/_version.py)) 0;
name = "${pname}-${version}";

propagatedBuildInputs = with python3Packages; [
Expand All @@ -87,6 +89,7 @@ in pkgs.python3Packages.buildPythonPackage rec {
questionary
pycrypto
siphash
ecdsa
] ++ (lib.optional withUnfreePkgs pynrfjprog);

src = ./.;
Expand Down
2 changes: 1 addition & 1 deletion tockloader/tickv.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def reset(self):

def _reset(self):
db_len = len(self.storage_binary)
self.storage_binary = bytearray(b"\xFF" * db_len)
self.storage_binary = bytearray(b"\xff" * db_len)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not that it does anything, but is this change supposed to be in this PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... you didn't do this..., this thing did: https://github.com/tock/tockloader/blob/master/.github/workflows/autoblack.yml

huh, it's a bit unfortunate that that tool looks at unchanged code, feels like it injects weird noise of unrelated changes into PRs... :/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was done automatically by some agent called autoblack, and I had no part in it (see the second commit, which was added not by me)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they changed the style: psf/black#2916


# Add the known initialize key, value. I don't know what this key
# is from, but it is the standard.
Expand Down