Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.242
rev: v0.0.254
hooks:
- id: ruff
args: ["--fix"]
2 changes: 1 addition & 1 deletion jupyter_releaser/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def format(changelog): # noqa
return re.sub(r"\n\n+$", r"\n", changelog)


def check_entry( # noqa
def check_entry(
ref,
branch,
repo,
Expand Down
2 changes: 1 addition & 1 deletion jupyter_releaser/mock_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async def upload_a_release_asset(owner: str, repo: str, release_id: int, request
asset = Asset(
id=asset_id,
name=name,
size=headers["content-length"],
size=int(headers["content-length"]),
url=url,
content_type=headers["content-type"],
)
Expand Down
2 changes: 1 addition & 1 deletion jupyter_releaser/tee.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def _read_stream(stream: StreamReader, callback: Callable[..., Any]) -> No
break


async def _stream_subprocess(args: str, **kwargs: Any) -> CompletedProcess: # noqa
async def _stream_subprocess(args: str, **kwargs: Any) -> CompletedProcess:
platform_settings: Dict[str, Any] = {}
if platform.system() == "Windows":
platform_settings["env"] = os.environ
Expand Down
12 changes: 6 additions & 6 deletions jupyter_releaser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def create_release_commit(version, release_message=None, dist_dir="dist"):
cmd += ' -m "SHA256 hashes:"'

for path in sorted(files):
path = normalize_path(path)
path = normalize_path(path) # noqa
sha256 = compute_sha256(path)
shas[path] = sha256
name = osp.basename(path)
Expand Down Expand Up @@ -319,7 +319,7 @@ def bump_version(version_spec, *, changelog_path="", version_cmd=""): # noqa

else:
# Handle dev version spec.
if version_spec == "dev":
if version_spec == "dev": # noqa
if v.pre:
version_spec = f"{v.major}.{v.minor}.{v.micro}.dev0"
# Bump to next minor dev.
Expand Down Expand Up @@ -680,15 +680,15 @@ def get_gh_object(dry_run=False, **kwargs):

def get_remote_name(dry_run):
"""Get the appropriate remote git name."""
global _local_remote
global _local_remote # noqa
if not dry_run:
return "origin"

if _local_remote:
try:
run(f"git remote add test {_local_remote}")
except Exception:
pass # noqa
except Exception: # noqa
pass
return "test"

tfile = tempfile.NamedTemporaryFile(suffix=".git")
Expand All @@ -705,7 +705,7 @@ def get_mock_github_url():
return f"http://127.0.0.1:{port}"


def ensure_mock_github(): # noqa
def ensure_mock_github():
"""Check for or start a mock github server."""
core.GH_HOST = host = get_mock_github_url()
port = urlparse(host).port
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ dependencies = [
"black==23.1.0",
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff==0.0.242"
"ruff==0.0.254"
]
detached = true
[tool.hatch.envs.lint.scripts]
Expand Down