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

Ruff: enable ruff-specific rules #2218

Merged
merged 4 commits into from
Aug 19, 2024
Merged

Conversation

adamjstewart
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added documentation Improvements or additions to documentation datasets Geospatial or benchmark datasets models Models and pretrained weights testing Continuous integration testing transforms Data augmentation transforms datamodules PyTorch Lightning datamodules dependencies Packaging and dependencies scripts Training and evaluation scripts labels Aug 9, 2024
@@ -175,9 +175,9 @@ class FAIR1M(NonGeoDataset):
os.path.join('validation', 'images'),
os.path.join('validation', 'labelXml'),
),
'test': (os.path.join('test', 'images')),
'test': (os.path.join('test', 'images'),),
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 was an actual bug in the dataset uncovered by mypy once I added type hints!

@@ -458,7 +458,7 @@ def __init__(
# See if file has a color map
if len(self.cmap) == 0:
try:
self.cmap = src.colormap(1)
self.cmap = src.colormap(1) # type: ignore[misc]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't love ignoring this but also don't see a better solution.

@adamjstewart adamjstewart added this to the 0.6.0 milestone Aug 19, 2024
@adamjstewart adamjstewart merged commit 067ae1a into microsoft:main Aug 19, 2024
19 of 20 checks passed
@adamjstewart adamjstewart deleted the ruff/ruf branch August 19, 2024 13:07
This was referenced Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodules PyTorch Lightning datamodules datasets Geospatial or benchmark datasets dependencies Packaging and dependencies documentation Improvements or additions to documentation models Models and pretrained weights scripts Training and evaluation scripts testing Continuous integration testing transforms Data augmentation transforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant