-
Notifications
You must be signed in to change notification settings - Fork 8
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
gh-231: add ruff
linting to pre-commit
#232
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
6bec081
Add `ruff` linting to `pre-commit`
paddyroddy 6646a40
Removing the `classmethod` stuff
paddyroddy 431c12e
Fix some `ruff` linting issues
paddyroddy dfb69e8
Be careful with `isort`
paddyroddy f41a589
Fix notebook imports
paddyroddy c880960
FIx import
paddyroddy bc26cde
Import
paddyroddy d9ced9d
Remove blank line
paddyroddy ff6f47d
Ignore more rules
paddyroddy 8fc670d
Fix more `ruff` rules
paddyroddy a3f00f2
More `ruff` fixing
paddyroddy cdd99b6
More `ruff` fixes
paddyroddy 1267516
More `ruff`
paddyroddy 6c936e1
No warnings from `ruff`
paddyroddy 9e6388e
SIlence `D205`
paddyroddy 9162dbf
Remove duplicate `_`
paddyroddy 2611eeb
Add equation
paddyroddy fb63a5a
Change to `NamedTuple`
paddyroddy 8e6ba5e
Merge branch 'main' into paddy/ruff-lint
paddyroddy 75e37aa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d4ccd3a
Extend title `=`
paddyroddy d3241fd
Merge branch 'main' into paddy/ruff-lint
paddyroddy 0c6e6ce
Add to git blame
paddyroddy 14563b3
STY: pre-commit fixes
pre-commit-ci[bot] 19d1a6c
Extend docs
paddyroddy 4d36ab5
Update docstring
paddyroddy b83bc79
Fix docs
paddyroddy 2236bd1
Add second underscore
paddyroddy f88ddf1
Fix all doc titles
paddyroddy dec1bae
Merge branch 'main' into paddy/ruff-lint
Saransh-cpp 8fb20f3
cleanup from code review
Saransh-cpp cf2982f
headings without period
Saransh-cpp 7a7e6e8
docs inside class, allow yoda conditions
Saransh-cpp 1bdcc6b
avoid one-liner conditionals
Saransh-cpp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,71 @@ | ||
"""GLASS package.""" | ||
|
||
import contextlib | ||
from importlib.metadata import PackageNotFoundError | ||
|
||
try: | ||
with contextlib.suppress(PackageNotFoundError): | ||
from ._version import __version__, __version_tuple__ | ||
except PackageNotFoundError: | ||
pass | ||
|
||
from glass.fields import ( | ||
iternorm, | ||
cls2cov, | ||
multalm, | ||
transform_cls, | ||
effective_cls, | ||
gaussian_gls, | ||
lognormal_gls, | ||
generate_gaussian, | ||
generate_lognormal, | ||
getcl, | ||
effective_cls, | ||
iternorm, | ||
lognormal_gls, | ||
multalm, | ||
transform_cls, | ||
) | ||
from glass.galaxies import ( | ||
redshifts, | ||
redshifts_from_nz, | ||
galaxy_shear, | ||
gaussian_phz, | ||
redshifts, | ||
redshifts_from_nz, | ||
) | ||
from glass.lensing import ( | ||
from_convergence, | ||
shear_from_convergence, | ||
MultiPlaneConvergence, | ||
deflect, | ||
from_convergence, | ||
multi_plane_matrix, | ||
multi_plane_weights, | ||
deflect, | ||
shear_from_convergence, | ||
) | ||
from glass.observations import ( | ||
vmap_galactic_ecliptic, | ||
equal_dens_zbins, | ||
fixed_zbins, | ||
gaussian_nz, | ||
smail_nz, | ||
fixed_zbins, | ||
equal_dens_zbins, | ||
tomo_nz_gausserr, | ||
vmap_galactic_ecliptic, | ||
) | ||
from glass.points import ( | ||
effective_bias, | ||
linear_bias, | ||
loglinear_bias, | ||
position_weights, | ||
positions_from_delta, | ||
uniform_positions, | ||
position_weights, | ||
) | ||
from glass.shapes import ( | ||
triaxial_axis_ratio, | ||
ellipticity_ryden04, | ||
ellipticity_gaussian, | ||
ellipticity_intnorm, | ||
ellipticity_ryden04, | ||
triaxial_axis_ratio, | ||
) | ||
from glass.shells import ( | ||
distance_weight, | ||
volume_weight, | ||
RadialWindow, | ||
combine, | ||
cubic_windows, | ||
density_weight, | ||
tophat_windows, | ||
distance_grid, | ||
distance_weight, | ||
linear_windows, | ||
cubic_windows, | ||
restrict, | ||
partition, | ||
redshift_grid, | ||
distance_grid, | ||
combine, | ||
RadialWindow, | ||
restrict, | ||
tophat_windows, | ||
volume_weight, | ||
) | ||
from glass.user import save_cls, load_cls, write_catalog | ||
from glass.user import load_cls, save_cls, write_catalog |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Saransh-cpp when this is merged can you add the commit hash underneath?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫡