Skip to content

Pylint Score Increased for apps/hosts #4559

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
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Akshat453
Copy link
Contributor

Fixes Issue : #4557

Pylint Score After Changes: Your code has been rated at 10.00/10

.pylintrc Outdated
@@ -12,7 +12,7 @@
# W0232: Class has no __init__ method.
# W0613: Unused argument.
# W0702: No exception type(s) specified.
disable=C0103,C0111,C0330,C1001,D100,E1101,R0201,R0903,W0223,W0232,W0613,W0702
disable=C0103,C0111,E0401,C0330,C1001,D100,E1101,R0201,R0903,W0223,W0232,W0613,W0702,E0402
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not disbale E0402. Please try and find a fix for it.

Copy link
Contributor Author

@Akshat453 Akshat453 Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have to fine fix for both E0402 and E0401 right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already fixed E0401 in #4556

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay I'll find fix for E0402 and let you know

@RishabhJain2018
Copy link
Member

Please resolve the conflicts too!

@Akshat453
Copy link
Contributor Author

Hello @RishabhJain2018 I have fixed the E0402 import error by changing relative imports (like from challenges.models) to absolute imports (from apps.challenges.models) to improve the Pylint score. However, this change is now causing the build to fail

@RishabhJain2018
Copy link
Member

Please resolve the conflicts.

@Akshat453
Copy link
Contributor Author

@RishabhJain2018 i have resolved the conflicts

@Akshat453
Copy link
Contributor Author

Akshat453 commented Apr 22, 2025

Hey @RishabhJain2018,

The build is currently failing due to the following error:
RuntimeError: Conflicting 'challenge_participant_teams' models in application 'challenges': <class 'challenges.models.Challenge_participant_teams'> and <class 'apps.challenges.models.Challenge_participant_teams'>.

This conflict arises because in most files the model is imported as "from challenges.models import Challenge", but in utils.py, I had to change it to "from apps.challenges.models import Challenge" to resolve an import error during runtime.

Would it be better to update all instances across the codebase to use "from apps.challenges.models import Challenge" for consistency, or should I instead revert my change and stick with "from challenges.models import Challenge" if that works

@Akshat453
Copy link
Contributor Author

Akshat453 commented Apr 23, 2025

Hey @RishabhJain2018,

The build is currently failing due to the following error: RuntimeError: Conflicting 'challenge_participant_teams' models in application 'challenges': <class 'challenges.models.Challenge_participant_teams'> and <class 'apps.challenges.models.Challenge_participant_teams'>.

This conflict arises because in most files the model is imported as "from challenges.models import Challenge", but in utils.py, I had to change it to "from apps.challenges.models import Challenge" to resolve an import error during runtime.

Would it be better to update all instances across the codebase to use "from apps.challenges.models import Challenge" for consistency, or should I instead revert my change and stick with "from challenges.models import Challenge" if that works

Hey @RishabhJain2018 ,Can you review this

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.

2 participants