Skip to content

Commit

Permalink
Merge pull request #7442 from nabobalis/pre
Browse files Browse the repository at this point in the history
update ruff and updated config
  • Loading branch information
Cadair committed Feb 13, 2024
2 parents 20d23c5 + aae3e22 commit cf1360d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: "\\.asdf$"
repos:
# This should be before any formatting hooks like isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.15"
rev: "v0.2.1"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
2 changes: 2 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exclude = [
"sunpy/extern/**",
"sunpy/version.py",
]

[lint]
select = ["E", "F", "W", "UP", "PT"]
extend-ignore = [
# pycodestyle (E, W)
Expand Down
3 changes: 1 addition & 2 deletions sunpy/net/dataretriever/sources/rhessi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This module was developed under funding provided by
# Google Summer of Code 2014
import csv
import socket
from datetime import datetime
from http.client import RemoteDisconnected
from urllib.error import URLError
Expand Down Expand Up @@ -92,7 +91,7 @@ def get_base_url():
try:
urlopen(server, timeout=1)
return server
except (RemoteDisconnected, URLError, socket.timeout):
except (TimeoutError, RemoteDisconnected, URLError):
pass
raise OSError(f'Unable to find an online HESSI server from {data_servers}')

Expand Down

0 comments on commit cf1360d

Please sign in to comment.