Closed lkeegan closed 1 year ago
Describe the bug
v0.5.2 gives an error when ran on pre-commit.ci:
https://results.pre-commit.ci/run/github/515183454/1679944727.JClYHld9R86c8Z37AT7JVQ
flake8-nb................................................................Failed - hook id: flake8-nb - exit code: 1 Traceback (most recent call last): File "/pc/clone/YcfFcd-3Q7uLovJnWJL3mg/py_env-python3/bin/flake8-nb", line 8, in <module> sys.exit(main()) ^^^^^^ File "/pc/clone/YcfFcd-3Q7uLovJnWJL3mg/py_env-python3/lib/python3.11/site-packages/flake8_nb/__main__.py", line 21, in main app = Flake8NbApplication() ^^^^^^^^^^^^^^^^^^^^^ File "/pc/clone/YcfFcd-3Q7uLovJnWJL3mg/py_env-python3/lib/python3.11/site-packages/flake8_nb/flake8_integration/cli.py", line 197, in __init__ hack_config_module() File "/pc/clone/YcfFcd-3Q7uLovJnWJL3mg/py_env-python3/lib/python3.11/site-packages/flake8_nb/flake8_integration/cli.py", line 158, in hack_config_module hacked_config_path.write_text(hacked_config_source) File "/usr/lib/python3.11/pathlib.py", line 1078, in write_text with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/pathlib.py", line 1044, in open return io.open(self, mode, buffering, encoding, errors, newline) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [Errno 30] Read-only file system: '/pc/clone/YcfFcd-3Q7uLovJnWJL3mg/py_env-python3/lib/python3.11/site-packages/flake8_nb/flake8_integration/hacked_config.py'
I think this is due to https://github.com/s-weigand/flake8-nb/pull/251 writing the hacked config to disk, and pre-commit.ci running on a read-only filesystem
Closed via #290
@lkeegan Your fix is available in the v0.5.3 tag
@s-weigand many thanks for the fast response! I can confirm v0.5.3 is working for me in pre-commit ci
Describe the bug
v0.5.2 gives an error when ran on pre-commit.ci:
https://results.pre-commit.ci/run/github/515183454/1679944727.JClYHld9R86c8Z37AT7JVQ
I think this is due to https://github.com/s-weigand/flake8-nb/pull/251 writing the hacked config to disk, and pre-commit.ci running on a read-only filesystem