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

tests: replaced module imports to the top #4656

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ per-file-ignores =
python/grass/temporal/temporal_topology_dataset_connector.py: E722
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
python/grass/pygrass/tests/benchmark.py: E402, F821
python/grass/pygrass/tests/benchmark.py: F821
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
# Files not managed by Black
python/grass/imaging/images2gif.py: E226
Comment on lines 81 to -84
Copy link
Member

Choose a reason for hiding this comment

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

At the next PR, I think you could have a clean up of the comments of sections that are now empty.

# Unused imports in init files
# F403 star import used; unable to detect undefined names
python/grass/*/__init__.py: F401, F403
Expand Down
7 changes: 3 additions & 4 deletions python/grass/pygrass/tests/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
import sys
from jinja2 import Template
from pathlib import Path

sys.path.append(str(Path.cwd()))
sys.path.append("%s/.." % (str(Path.cwd())))

import grass.lib.gis as libgis
import grass.lib.raster as libraster
import grass.script as gs
import ctypes

sys.path.append(str(Path.cwd()))
sys.path.append("%s/.." % (str(Path.cwd())))

echoix marked this conversation as resolved.
Show resolved Hide resolved

def test__RasterSegment_value_access__if():
test_a = pygrass.RasterSegment(name="test_a")
Expand Down
Loading