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

F841 E722 and F405 #20

Merged
merged 35 commits into from
Oct 29, 2024
Merged

F841 E722 and F405 #20

merged 35 commits into from
Oct 29, 2024

Conversation

a0x8o
Copy link
Owner

@a0x8o a0x8o commented Oct 24, 2024

arohanajit and others added 12 commits October 21, 2024 15:29
* style: Fix if-else-block-instead-of-if-exp (SIM108) in scripts/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* style: Fix if-else-block-instead-of-if-exp (SIM108) in python/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* checks: Rename inner variable shadowing type to _type in python/grass/temporal/gui_support.py

* style: Manual fixes for if-else-block-instead-of-if-exp (SIM108) in python/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp
* fixed 841

* fixed busyInfo
…e it with that of db_get_login2() (#4302)

`db_get_login()` is deprecated in 7.8.0 release with da399c5. Change its function signature and implementation to match that of the currently preferred `db_get_login2()`. Technically, this is removing the old function and introducing a new one with the same name, but a different signature.

Modify `db_get_login2()` to internally call `db_get_login()` function call. In the next major version, `db_get_login2()` should be removed to have only one method to get login details for simplicity.

See also #4308.

---------

Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
…e it with that of db_set_login2() (#4308)

`db_set_login()` is deprecated in 7.8.0 release with da399c5. Change its function signature and implementation to match that of the currently preferred `db_set_login2()`. Technically, this is removing the old function and introducing a new one with the same name, but a different signature.

Modify `db_set_login2()` to internally call `db_set_login()` function call. In the next major version, `db_set_login2()` should be removed to have only one method to get login details for simplicity.

See also #4308.

---------

Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
* t.rast.accumulate: Remove unused SimpleModule import in test_accumulation

* temporal: Fix unused-import (F401) in testsuite

* grass.temporal: Fix unused-import (F401)

* grass.benchmark: Fix unused-import (F401) by defining __all__

* grass.pygrass.vector: Fix unused-import (F401) for testsuite

* grass.pygrass.vector: Sort imports

* vector: Fix unused-import (F401) for testsuite

* scripts: Fix unused-import (F401) for testsuite

* raster: Fix unused-import (F401) for testsuite

* v.fill.holes: Fix unused-import (F401)

* doc: Fix unused-import (F401)

* grass.semantic_label: Fix unused-import (F401) by defining __all__ in __init__

* grass.pygrass.rpc: Fix unused-import (F401) in __init__

* grass.pygrass.modules.interface: Fix unused-import (F401) by defining __all__ in __init__

* grass.pygrass.modules.interface: Apply isort

* grass.pygrass.modules.grid: Fix unused-import (F401) by defining __all__ in __init__

* grass.pygrass.modules: Fix unused-import (F401) by defining __all__ in __init__

* grass.pygrass.modules: Apply isort

* grass.imaging: Fix unused-import (F401) by defining __all__ in __init__

* grass.imaging: Apply isort

* grass.jupyter: Fix unused-import (F401) by defining __all__ in __init__

* grass.jupyter: Apply isort

* pygrass: Ignore F401 (unused imports)

Ignored inline where the import is justified and isn't to fix later, and ignored in a per-file exclusion where the imports seemed to be for commented-out test case lines

* lib/gis: Fix F401 unused platform import in test_gis_lib_getl

* grass.script: Ignore F401 in `__init__.py` for setup import

* style: Remove exclusion for F401 ruff rule

* style: Remove unneeded flake8 exclusions for F401

* Apply suggestions from code review
@github-actions github-actions bot added the HTML label Oct 24, 2024
renovate bot and others added 4 commits October 24, 2024 23:53
* Add tests to r.his

* Add assertRasterFitsUnivar

* Update assertRasterFitsUnivar

* Add g.region to make r.univar values consistent

* Update raster/r.his/testsuite/test_r_his.py

Apply the suggestion.

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>

* Update raster/r.his/testsuite/test_r_his.py

Apply the suggestion.

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>

* Update raster/r.his/testsuite/test_r_his.py

Black styling

---------

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
…4591)

* r.support/i.band.library/r.semantic.label: better mention raster semantic labels
* v.db.reconnect.all: add missing keywords
* URLs: selectively change http to https; fix a few broken URLs
arohanajit and others added 18 commits October 25, 2024 13:32
* style: Fix if-else-block-instead-of-if-exp (SIM108) in scripts/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* style: Fix if-else-block-instead-of-if-exp (SIM108) in python/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* checks: Rename inner variable shadowing type to _type in python/grass/temporal/gui_support.py

* style: Manual fixes for if-else-block-instead-of-if-exp (SIM108) in python/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* style: Fix if-else-block-instead-of-if-exp (SIM108) in gui/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* checks: Rename inner variable shadowing list to _list in gui/wxpython/core/render.py

* style: Manual fixes for if-else-block-instead-of-if-exp (SIM108) in gui/

Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp

* python: Add type annotations for grass.script.core.parser()

* python: Add type annotations for is_time_absolute() and is_time_relative() in grass.temporal.AbstractDataset

* style: Enable Checking for SIM108

* Update pyproject.toml to remove fixed issues

* Update base.py

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>

---------

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
In C++20, repeating template parameter names with the name of the class is no longer allowed as it is redundant (https://cplusplus.github.io/CWG/issues/2237.html). The new code is valid also in C++17, but the old code is not accepted in C++20.
* temporal: Add precise typing overloads to dataset_factory

This enables type checkers like mypy or Pyright to understand the returned class from the string passed as the type argument

* temporal: Add typing overloads to dataset_factory

* temporal: Add dataset_factory implementation with str type for type argument

* temporal: Remove dataset_factory overload that listed all literal types

* temporal: Update dataset_factory file header

* temporal: Add dataset_factory overload with str type for type argument

* temporal: Accept None for id argument in dataset_factory overload as used in existing calls
@a0x8o a0x8o merged commit e6fd110 into a0x8o:main Oct 29, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.