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

fix pylint warnings by fixing a test #733

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Conversation

LeXofLeviafan
Copy link
Collaborator

@LeXofLeviafan LeXofLeviafan commented Apr 28, 2024

I couldn't manage to reproduce the warnings locally… I wonder what's causing the difference 🤔 Turns out pylint misses some checks when it doesn't have access to sources of imported modules. (…Also it only works with Python 3.12 for some reason.)

@LeXofLeviafan LeXofLeviafan force-pushed the fix-warnings branch 2 times, most recently from 9bac1b1 to e403e51 Compare April 28, 2024 18:06
@LeXofLeviafan
Copy link
Collaborator Author

LeXofLeviafan commented Apr 28, 2024

…Seems like the issue is actually due to pylint bugging out and failing to locate the type during CI testing 🤔

Turns out that's not quite the case; though it's odd that it actually requires a very specific set of conditions to be reproduced.

@LeXofLeviafan
Copy link
Collaborator Author

…More specifically, these conditions are required for this error to happen:

  • Python version must be 3.12;
  • werkzeug package must be present in the Python environment;
  • The files with errors and tests/test_views.py must be linted during the same run.

(The kicker is, the cause of the warning is not within either of the files it's printed out for 😅)

@LeXofLeviafan LeXofLeviafan changed the title fix pylint warnings by specifying the request.args type fix pylint warnings by fixing a test Apr 28, 2024
deps = pylint
deps =
pylint
.[tests]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(This one fixes inability to reproduce the error when running lint locally via tox)

@jarun jarun merged commit 4c2bb26 into jarun:master Apr 29, 2024
1 check passed
@jarun
Copy link
Owner

jarun commented Apr 29, 2024

Thank you!

@LeXofLeviafan LeXofLeviafan deleted the fix-warnings branch August 24, 2024 17:36
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