-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature Request] a new lint rule to require that each block must end with ... (Ellipsis) or #. (HashtagDot) or a new line. #9685
Comments
Please don't reopen closed issues. |
@Pierre-Sassoulas I have also contributed to rust lint previously and my proposal was completed and merged. As suggested, I will be looking into creating a plugin for this feature. |
You did not contribute, it was written by somebody else, and the largest discussion in that PR was about how to correctly phrase why it was such a bad lint (rust-lang/rust-clippy#3494). I also see you link to that issue in various other repositories (modularml/mojo#2929 and astral-sh/ruff#11698) where you have received similar negative responses. To keep all open source maintainers from going insane and spending too much time on your unnecessary issues and comments consider this your last warning before I ban you from this organisation and report you for spamming various repositories. Read up on tools your opening issues against, see what they design philosophy is and act like the maintainers ask you to. Good luck with writing your plugin! I hope to see it on PyPI one day 😄 |
I posted the proposal to different project since I see it could be useful for these projects as well, with similar indentation code block code style, and an average person knows the difference between spamming and discussing. My rust lint proposal is the older and first one, and it's marked completed and merged as stated on the issue. I didn't code it though. Let's continue with pylint here. As I said, I am looking into implementing a plugin for this feature. |
Hello, |
Current problem
[Feature] new lint rule to require a comment #. at end each python block.
Desired solution
Hello,
Please create a new lint rule to require that each block must end with ... or #. or a new line.
This would work as a curly braces blocks found in C style languages.
Also, this could also be used to reformat python code by code editor to fix any indentation issues.
Users can also use a different word symbol or use a new line for this purpose. (..., #., newline, etc). The user has the option to select the keyword they would like to have for the project. The difference between this proposal (:\n code_block \n#.) and curly braces ({}) in C languages is that curly braces are also indentation insensitive while this proposal is indentation sensitive just like indentation style languages.
There could also be a configurable threshold limit for block lines for which the
code_block_ending_marker
rule is activated and would apply (example: block_lines > 1 lines by default).Users can also use new line instead of # or #. by configuring
code_block_ending_marker_word
if it fits their project development.Example:
There are cases where strict block guarantees is required. Also, when copying python code sometimes spacing is not aligned correctly and having code with this style with editor support, editor would fix incorrect spacing easily.
OR
would be aligned correctly by the editor to:
OR
Thank you,
Additional context
No response
The text was updated successfully, but these errors were encountered: