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

Add pylint configuration, fix linting issues, and update CI pipeline for Python #467

Merged
merged 51 commits into from
Sep 27, 2024

Conversation

kluge7
Copy link
Contributor

@kluge7 kluge7 commented Sep 23, 2024

This PR includes several improvements and refactorings related to code quality, linting, and CI pipeline updates. Please review the code carefully to ensure nothing broke during these changes.

@kluge7 kluge7 added refactor Restructures one or more parts of the code Moderate priority labels Sep 23, 2024
@kluge7 kluge7 force-pushed the 463-task-address-pylint-linting-errors-in-codebase branch from a58c285 to 377f8c1 Compare September 24, 2024 06:30
Copy link
Contributor

@Andeshog Andeshog left a comment

Choose a reason for hiding this comment

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

Good stuff so far! Only minor spelling and gotta agree on input output typing of functions/methods in python. Should be consistent. Maybe too advanced for linters to autofix, but they could at least detect it?

README.md Outdated Show resolved Hide resolved
self.get_logger().info("Acoustics PCB MCU IP: 10.0.0.111")
self.get_logger().info("Trying to connect...")

TeensyCommunicationUDP.init_communication(frequenciesOfInterest)
TeensyCommunicationUDP.init_communication(frequencies_of_interest)

self.get_logger().info("Sucsefully connected to Acoustics PCB MCU :D")

def data_update(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Sudden use of explicit output type. Should be consistent


This method calls the fetch_data method from the TeensyCommunicationUDP class
to update the data.
"""
TeensyCommunicationUDP.fetch_data()

def data_publisher(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

inconsistent use of -> None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now all functions should have a return type annotation (so all functions that dont return anything now have a -> None)

auv_setup/config/robots/orca.yaml Outdated Show resolved Hide resolved
auv_setup/config/robots/orca.yaml Outdated Show resolved Hide resolved
mission/blackbox/package.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@Andeshog Andeshog left a comment

Choose a reason for hiding this comment

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

Closing in

mission/LCD/sources/lcd.py Show resolved Hide resolved
mission/LCD/sources/lcd.py Show resolved Hide resolved
@chrstrom
Copy link
Member

Just a head's up @kluge7 @Hallfred, there are a lot of deprecated typing. aliases, so using built-in types is now mostly favored (like Dict and List being deprecated for dict and list), check out https://docs.python.org/3/library/typing.html (and the Aliases to built-in types section in particular)

@kluge7 kluge7 merged commit 0cd2b87 into develop Sep 27, 2024
9 checks passed
@kluge7 kluge7 deleted the 463-task-address-pylint-linting-errors-in-codebase branch September 27, 2024 12:14
@kluge7 kluge7 linked an issue Oct 1, 2024 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AUV Moderate priority refactor Restructures one or more parts of the code
Projects
None yet
4 participants