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 linting issues in gui_tools #221

Closed
25 tasks
mwcraig opened this issue Dec 19, 2023 · 0 comments · Fixed by #248
Closed
25 tasks

Fix linting issues in gui_tools #221

mwcraig opened this issue Dec 19, 2023 · 0 comments · Fixed by #248
Assignees
Labels
linting refactor Summer 2023 project to rewrite stellarphot

Comments

@mwcraig
Copy link
Contributor

mwcraig commented Dec 19, 2023

For all of these issues, first delete the appropriate line in pyproject.toml that excludes the subpackage from checks. For gui_tools you would delete this line:

"stellarphot/gui_tools/*" = ["F", "ARG"]

After that, run ruff either with tox -e lint or ruff .. The errors you get should be the ones -- fix them! If it is an unused function argument make sure to search the project for calls to that function to update the arguments there too. If it is an import * in a file then replace it with an explicit import of the functions actually used.

  • stellarphot/gui_tools/comparison_functions.py:20:1: F403 from stellarphot.differential_photometry import * used; unable to detect undefined names
  • [ ]stellarphot/gui_tools/comparison_functions.py:21:1: F403 from stellarphot.photometry import * used; unable to detect undefined names
  • stellarphot/gui_tools/comparison_functions.py:120:12: ARG001 Unused function argument: viewer
  • stellarphot/gui_tools/comparison_functions.py:120:27: ARG001 Unused function argument: data_x
  • stellarphot/gui_tools/comparison_functions.py:120:35: ARG001 Unused function argument: data_y
  • stellarphot/gui_tools/comparison_functions.py:127:9: F841 Local variable pad is assigned to but never used
  • stellarphot/gui_tools/comparison_functions.py:128:9: F841 Local variable x is assigned to but never used
  • stellarphot/gui_tools/comparison_functions.py:129:9: F841 Local variable y is assigned to but never used
  • stellarphot/gui_tools/comparison_functions.py:368:25: ARG002 Unused method argument: change
  • stellarphot/gui_tools/comparison_functions.py:389:39: ARG002 Unused method argument: button
  • stellarphot/gui_tools/comparison_functions.py:414:38: ARG002 Unused method argument: button
  • stellarphot/gui_tools/comparison_functions.py:566:31: ARG002 Unused method argument: button
  • stellarphot/gui_tools/fits_opener.py:52:39: ARG005 Unused lambda argument: x
  • stellarphot/gui_tools/photometry_widget_functions.py:83:35: ARG002 Unused method argument: change
  • stellarphot/gui_tools/photometry_widget_functions.py:91:41: ARG002 Unused method argument: change
  • stellarphot/gui_tools/seeing_profile_functions.py:476:9: F841 Local variable layout is assigned to but never used
  • stellarphot/gui_tools/seeing_profile_functions.py:522:25: ARG002 Unused method argument: file
  • stellarphot/gui_tools/seeing_profile_functions.py:545:40: ARG002 Unused method argument: change
  • stellarphot/gui_tools/seeing_profile_functions.py:558:33: ARG002 Unused method argument: button
  • stellarphot/gui_tools/seeing_profile_functions.py:587:33: ARG002 Unused method argument: button
  • stellarphot/gui_tools/seeing_profile_functions.py:589:24: F821 Undefined name ap_rad
  • stellarphot/gui_tools/seeing_profile_functions.py:589:33: F821 Undefined name ap_rad
  • stellarphot/gui_tools/seeing_profile_functions.py:589:47: F821 Undefined name ap_rad
  • stellarphot/gui_tools/seeing_profile_functions.py:623:24: ARG001 Unused function argument: viewer
  • stellarphot/gui_tools/seeing_profile_functions.py:623:44: ARG001 Unused function argument: datax
  • stellarphot/gui_tools/seeing_profile_functions.py:623:56: ARG001 Unused function argument: datay
@mwcraig mwcraig added refactor Summer 2023 project to rewrite stellarphot linting labels Dec 19, 2023
@mwcraig mwcraig self-assigned this Jan 4, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in stellarphot refactoring Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linting refactor Summer 2023 project to rewrite stellarphot
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant