Skip to content
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

feat: flake8 and sonarcloud fixes #225

Draft
wants to merge 42 commits into
base: master
Choose a base branch
from
Draft

feat: flake8 and sonarcloud fixes #225

wants to merge 42 commits into from

Conversation

shawaj
Copy link
Member

@shawaj shawaj commented Jan 4, 2023

No description provided.

@shawaj
Copy link
Member Author

shawaj commented Jan 5, 2023

Remaining flake8 issues:

File papirus/epd.py...

Warning: ./papirus/epd.py:55:40: W605 invalid escape sequence '\s'
Warning: ./papirus/epd.py:55:44: W605 invalid escape sequence '\d'
Warning: ./papirus/epd.py:55:47: W605 invalid escape sequence '\.'
Warning: ./papirus/epd.py:55:49: W605 invalid escape sequence '\d'
Warning: ./papirus/epd.py:55:53: W605 invalid escape sequence '\s'
Warning: ./papirus/epd.py:55:57: W605 invalid escape sequence '\d'
Warning: ./papirus/epd.py:55:63: W605 invalid escape sequence '\d'
Warning: ./papirus/epd.py:55:67: W605 invalid escape sequence '\s'
Warning: ./papirus/epd.py:55:73: W605 invalid escape sequence '\s'
Warning: ./papirus/epd.py:55:77: W605 invalid escape sequence '\d'
Error: ./papirus/epd.py:55:80: E501 line too long (110 > 79 characters)
Warning: ./papirus/epd.py:55:81: W605 invalid escape sequence '\s'
Warning: ./papirus/epd.py:55:88: W605 invalid escape sequence '\s'
Warning: ./papirus/epd.py:55:92: W605 invalid escape sequence '\d'
Warning: ./papirus/epd.py:55:96: W605 invalid escape sequence '\s'

File papirus/text.py...

Warning: ./papirus/text.py:26:9: F841 local variable 'lineSize' is assigned to but never used

File papirus/textpos.py...

Warning: ./papirus/textpos.py:79:5: C901 'PapirusTextPos.addToImageText' is too complex (13)

File projects/twitter_feed.py...

Warning: ./projects/twitter_feed.py:5:1: F401 'papirus.Papirus' imported but unused
Warning: ./projects/twitter_feed.py:6:1: F401 'papirus.PapirusText' imported but unused
Warning: ./projects/twitter_feed.py:65:9: F821 undefined name 'write_text'
Warning: ./projects/twitter_feed.py:65:20: F821 undefined name 'papirus'
Warning: ./projects/twitter_feed.py:65:44: F821 undefined name 'SIZE'
Warning: ./projects/twitter_feed.py:67:9: F821 undefined name 'papirus'

@ChristopherRush any idea on the ones for twitter_feed.py? As you wrote this, I thought you might be able to have a better idea

@shawaj shawaj changed the title Update prtc.py feat: flake8 and sonarcloud fixes Jan 6, 2023
@shawaj
Copy link
Member Author

shawaj commented Jan 6, 2023

For the papirus/text.py one I'm wondering self.papirus.width on line 38 should actually be lineSize

" " + word, font=font)[0]) < self.papirus.width:

@shawaj
Copy link
Member Author

shawaj commented Jan 6, 2023

For the papirus/textpos.py one, I'm thinking to just ignore this for now, and open a new issue on the repo to fix this another time.

Thoughts?

@shawaj
Copy link
Member Author

shawaj commented Jan 6, 2023

For the papirus/epd.py issues it looks like we can just use an r string:
https://docs.python.org/3/library/re.html

And split the line in two for the line length

@sonarcloud
Copy link

sonarcloud bot commented Jan 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@shawaj
Copy link
Member Author

shawaj commented Jan 6, 2023

I'm not a fan of camelCase (and it seems sonarcloud isn't either! 😂)

However since this was only introduced in #144 I'm going to revert the changes I made on these and dismiss the code smells in sonarcloud 👍

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

Successfully merging this pull request may close these issues.

1 participant