-
Notifications
You must be signed in to change notification settings - Fork 9
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
Ruff proposal #156
base: ruff
Are you sure you want to change the base?
Ruff proposal #156
Conversation
Coverage Report
|
@@ -177,7 +177,7 @@ def download_burst(asf_session: requests.Session, burst_params: BurstParams, out | |||
return Path(out_file) | |||
|
|||
|
|||
def spoof_safe(burst: BurstMetadata, burst_tiff_path: Path, base_path: Path = Path('.')) -> Path: | |||
def spoof_safe(burst: BurstMetadata, burst_tiff_path: Path, base_path: Path = Path.cwd()) -> Path: |
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.
Ruff does not like Path('.')
and would prefer you use either Path()
or Path.cwd()
. There were some gotcha's here around when '.'
was resolved to an actual path, so we'll want to make sure that Path.cwd()
doesn't hit those again....
@@ -123,7 +123,7 @@ def run_stripmapapp(dostep: str = '', start: str = '', end: str = '', config_xml | |||
ValueError: If the step is not a valid step (see TOPSAPP_STEPS) | |||
""" | |||
if not config_xml.exists(): | |||
raise IOError(f'The config file {config_xml} does not exist!') | |||
raise OSError(f'The config file {config_xml} does not exist!') |
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.
IOError
is just a legacy/backwards compatible alias for OSError
so OSError
is preferred.
This updates ruff config in-line with the updates to the ruff action proposed in ASFHyP3/actions#95 and applies the lining auto fixes.
In particular, adopting the additional checks would result in needing to make quite a few changes to satisfy the linter: