Skip to content

Commit a7c805c

Browse files
Josverldpgeorge
authored andcommitted
mip: Optimize _CHUNK_SIZE const for code size.
17 bytes reduced. Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent 200e8d1 commit a7c805c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

micropython/mip/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metadata(version="0.4.1", description="On-device package installer for network-capable boards")
1+
metadata(version="0.4.2", description="On-device package installer for network-capable boards")
22

33
require("requests")
44

micropython/mip/mip/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# MicroPython package installer
22
# MIT license; Copyright (c) 2022 Jim Mussared
33

4-
from micropython import const
5-
import requests
64
import sys
75

6+
import requests
7+
8+
from micropython import const
89

910
_PACKAGE_INDEX = const("https://micropython.org/pi/v2")
10-
_CHUNK_SIZE = 128
11+
_CHUNK_SIZE = const(128)
1112

1213
allowed_mip_url_prefixes = ("http://", "https://", "github:", "gitlab:")
1314

0 commit comments

Comments
 (0)