Skip to content

Fix linting errors #1226

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

Merged
merged 4 commits into from
Nov 1, 2022
Merged

Conversation

caviere
Copy link
Contributor

@caviere caviere commented Oct 27, 2022

Fix possible unbound variable error
Avoid extra zarr version check
Add Optional typing to indicate value might be None

This avoids having to check the version twice: once in the "in [2,3]" and
also in the if/elif statement. It also fixes linting error of normalize_store
being possibly unbound.
@caviere caviere force-pushed the fix-linting-errors branch from 426d3c5 to d681659 Compare October 27, 2022 11:45
@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Merging #1226 (5cd9c16) into main (f2b5585) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##             main    #1226    +/-   ##
========================================
  Coverage   99.99%   99.99%            
========================================
  Files          33       35     +2     
  Lines       13744    14137   +393     
========================================
+ Hits        13743    14136   +393     
  Misses          1        1            
Impacted Files Coverage Δ
zarr/creation.py 100.00% <100.00%> (ø)
zarr/hierarchy.py 99.78% <100.00%> (+<0.01%) ⬆️
zarr/storage.py 100.00% <100.00%> (ø)
zarr/indexing.py 100.00% <0.00%> (ø)
zarr/tests/test_hierarchy.py 100.00% <0.00%> (ø)
zarr/util.py 100.00% <0.00%> (ø)
zarr/__init__.py 100.00% <0.00%> (ø)

Copy link
Member

@joshmoore joshmoore left a comment

Choose a reason for hiding this comment

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

Thanks, @caviere. Changes look fine and all is green.

Out of curiosity, what linter are these from?

@caviere
Copy link
Contributor Author

caviere commented Oct 31, 2022

I am using pyright currently

@joshmoore
Copy link
Member

Many thanks!

@joshmoore joshmoore merged commit 519f7ef into zarr-developers:main Nov 1, 2022
@Saransh-cpp Saransh-cpp mentioned this pull request Nov 18, 2022
6 tasks
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