Skip to content

Commit 03941fa

Browse files
update copyright year in docs config, import machine from fakes instead of Mock
1 parent f0ffae6 commit 03941fa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/conf.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@
1616
try:
1717
import umodbus
1818
except ImportError:
19-
raise SystemExit("umodbus has to be importable")
19+
raise SystemExit("umodbus and fakes have to be importable")
2020
else:
2121
# Inject mock modules so that we can build the
2222
# documentation without having the real stuff available
2323
from mock import Mock
24+
from fakes import machine
2425

25-
for mod_name in ['micropython', 'machine', 'urequests']:
26-
sys.modules[mod_name] = Mock()
27-
print("Mocked {}".format(mod_name))
26+
sys.modules['micropython'] = Mock()
27+
print("Mocked 'micropython' module")
28+
sys.modules['machine'] = machine
29+
print("Imported 'machine' module from 'fakes'")
2830

2931
# load elements of version.py
3032
exec(open(here / '..' / 'umodbus' / 'version.py').read())
3133

3234
# -- Project information
3335

3436
project = 'micropython-modbus'
35-
copyright = '2022, brainelectronics'
37+
copyright = '2023, brainelectronics'
3638
author = 'brainelectronics'
3739

3840
version = __version__

0 commit comments

Comments
 (0)