exercism / python

Exercism exercises in Python.
https://exercism.org/tracks/python
MIT License
1.94k stars 1.29k forks source link

Solution hints not helpful. #3176

Closed oseghr closed 2 years ago

oseghr commented 2 years ago

Completed the solution but kept getting several warnings such below:

Line 12 [C0303 trailing-whitespace] : ["Trailing whitespace"] was reported by Pylint. Which means this code doesn't follow general code style conventions. While this type of issue generally doesn't affect the way code executes, it can hurt readability or the performance of automated tools such as documentation generators or test runners.

Even after following the PEP documentation and expecting the warnings to stop it didn't. Please could this be a bug? The recommendation does not give an example of what the solution might look like. error

github-actions[bot] commented 2 years ago

🤖   🤖

Hi! 👋🏽 👋 Welcome to the Exercism Python Repo!

Thank you for opening an issue! 🐍  🌈 ✨


​          ◦ If you'd also like to make a PR to fix the issue, please have a quick look at the Pull Requests doc.
             We  💙  PRs that follow our Exercism & Track contributing guidelines!


💛  💙  While you are here... If you decide to help out with other open issues, you have our gratitude 🙌 🙌🏽.
Anything tagged with [help wanted] and without [Claimed] is up for grabs.
Comment on the issue and we will reserve it for you. 🌈 ✨

BethanyG commented 2 years ago

Hi @oseghr,

Thanks for filing this issue. When PyLint complains about "trailing whitespace", it is because there are excess "white space" (non visible but present) characters that are left at the end of lines of code. Things like [tab] (\t) or [space] (' ') or [newline] (\n) or [carriage return] (\r). While these are not fatal, they can cause problems under certain circumstances.

They are particularly annoying because you can't see them, and they (mostly) get ignored ..... until they don't.

Did you paste your code into the online editor? I often do that -- and it creates \n or ' ' at the ends of lines. It's not catastrophic, but if you go through and delete them, the bot will stop complaining. If you have done that already, then it may indeed be a problem with our analyzer -- in which case, we'll look at turning off the analyzer rule.

BethanyG commented 2 years ago

Closing as resolved/abandoned.