Skip to content

Commit

Permalink
cleanup style
Browse files Browse the repository at this point in the history
  • Loading branch information
svonworl committed Feb 22, 2024
1 parent 6b28f13 commit 4634f25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import io
import logging
import os
import requests
import signal
import subprocess # nosec
import sys
Expand All @@ -34,6 +33,7 @@

import argcomplete
import coloredlogs
import requests
import ruamel.yaml
from ruamel.yaml.comments import CommentedMap, CommentedSeq
from ruamel.yaml.main import YAML
Expand Down Expand Up @@ -176,8 +176,8 @@ def _signal_handler(signum: int, _: Any) -> None:

def append_word_to_default_user_agent(word: str) -> None:
"""Append the specified word to the requests http user agent string if it's not already there."""
original_function = requests.utils.default_user_agent;
suffix = f' {word}';
original_function = requests.utils.default_user_agent
suffix = f" {word}"
if not original_function().endswith(suffix):
requests.utils.default_user_agent = lambda *args: original_function(*args) + suffix

Expand Down

0 comments on commit 4634f25

Please sign in to comment.