Skip to content

Enable B (flake8-bugbear) ruleset and fix violations#1362

Open
Sherwin-14 wants to merge 3 commits into
earthaccess-dev:mainfrom
Sherwin-14:B
Open

Enable B (flake8-bugbear) ruleset and fix violations#1362
Sherwin-14 wants to merge 3 commits into
earthaccess-dev:mainfrom
Sherwin-14:B

Conversation

@Sherwin-14

@Sherwin-14 Sherwin-14 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Fixed errors and violations as a result of enabling B rulesets. Related to #383.


📚 Documentation preview 📚: https://earthaccess--1362.org.readthedocs.build/en/1362/

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Binder 👈 Launch a binder notebook on this branch for commit ae55ed8

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit e08a0d2

Binder 👈 Launch a binder notebook on this branch for commit d69587e

@Sherwin-14 Sherwin-14 requested a review from mfisher87 June 6, 2026 06:19
Comment thread earthaccess/store.py
)

@lru_cache
@lru_cache # noqa:B019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we should actually fix this one. Is it important for this function to return a unique httpfilesystem per instance of Store? I'm not sure at the moment. @betolink

@mfisher87 mfisher87 Jun 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, unrelated to this PR, but either the docstring or the return type annotation are wrong. Does this return AbstractFileSystem or HTTPFileSystem (I mean, technically both, but the "correcter" annotation should be the most specific, HTTPFileSystem, right?)

We shouldn't keep type information in the docstrings because it leads to this kind of sync problem. Autodoc will read the types from the function signature.

Comment thread earthaccess/auth.py Outdated
Comment thread tests/unit/test_store.py
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