Comments (2)
Thanks for the report!
First of all, I have to say that I'm a big fan of flake8
and linting in general.
The file that is triggering the error is a post save hook implementation that should be added as part of Jupyter configuration file (jupyter_notebook_config.py). The c
refers to Config
object which is automatically created and will be in the namespace when the post save hook implementation is loaded, see https://traitlets.readthedocs.io/en/latest/config.html#python-configuration-files.
I think the only reasonable way for fixing the linting error would be to add # noqa
for that line. However, the post save hook implementation file is actually the only .py file currently in the project. Thus, I think setting up linting, especially for CI, is a bit overkill here.
I may use some .py files as complementary materials in the future but I'm not sure if linting will make sense for those either. For example, if exercises would contain .py files, those files would most likely include some errors / missing code that the learner should fix. Linter would not be happy about this.
However, it would maybe make sense to have some sort of linting for the notebooks, excluding the exercise notebooks. If someone knows a solution which does not introduce any boilerplate to notebook cells, I'd be interested. I checked the different approaches presented here https://stackoverflow.com/questions/26126853/verifying-pep8-in-ipython-notebook-code but I don't think any of those is suitable for my use case.
from learn-python3.
Agreed. Closing. For reference, the other way to placate flake8 on this score is to declare global c.
from learn-python3.
Related Issues (17)
- ..
- Integrate binder HOT 3
- Adding popitem to dictionaries notebook
- .
- Python
- learn-python3
- learn-python3
- Learn python
- ..
- ipytest.magic seems deprecated HOT 1
- Python learn
- hello
- I don't understand this code
- My question: environments! HOT 2
- Add poetry to best practices HOT 1
- Add the logical ordering of Python Notesbooks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-python3.