Skip to content

The configuration files for Jupyter produce many lint errors now #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NeilGirdhar opened this issue Feb 21, 2025 · 6 comments
Open

Comments

@NeilGirdhar
Copy link

NeilGirdhar commented Feb 21, 2025

The generated configuration files don't adhere to the default behavior of standard linters. In particular:

  • Every # should be followed by exactly one space (there should never be any ##).
  • Every # noqa should be marked with its rule number (in this case, F821). And,
  • there should be no trailing whitespace.

(This appears to have been changed recently.)

I'm not sure if this was the correct project, but I spent about 30 minutes searching through the various projects.

Image

@Carreau
Copy link
Member

Carreau commented Apr 25, 2025

The "too many #", or comment should start with #- seem like a non issue, and should be ignored in the linter.

I think the trailing whitespace comes from the traitlets package.

(and no worries if you don't find the right package, it some dark magic)

@NeilGirdhar
Copy link
Author

Thanks for taking a look at this!

The "too many #", or comment should start with #- seem like a non issue, and should be ignored in the linter.

Feel free to do as you like, but if it were me, I'd make them just # Heading. or # # Heading. Just to avoid the linter errors.

@Carreau
Copy link
Member

Carreau commented Apr 29, 2025

I believe the point of having 2 #, is if you uncomment the whole file, it is still valid python. oh you make it just a single pound for headers, it is not the case anymore.

@NeilGirdhar
Copy link
Author

I don't understand? If you uncomment # the following:, that line won't be valid?

@Carreau
Copy link
Member

Carreau commented Apr 29, 2025

Ha you are right. Then I guess it's to distinguish header from description. I guess we could use a different marker for header then, I'm pretty sure a decade ago it was different and made to block comment/ uncomment.

@NeilGirdhar
Copy link
Author

Sounds great to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants