Skip to content

Commit

Permalink
feat: Add version to User Agent string
Browse files Browse the repository at this point in the history
  • Loading branch information
jimisola committed Oct 29, 2023
1 parent 5cecfd7 commit 0b15081
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/maven_artifact/requestor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import base64
import requests
from importlib.metadata import version

from maven_artifact.utils import Utils

Expand All @@ -10,7 +11,7 @@ def __init__(self, msg):


class Requestor(object):
def __init__(self, username=None, password=None, token=None, user_agent="Maven Artifact Downloader/1.0"):
def __init__(self, username=None, password=None, token=None, user_agent=f"Maven Artifact Downloader/{version('maven-artifact')}"):
self.user_agent = user_agent
self.username = username
self.password = password
Expand Down

0 comments on commit 0b15081

Please sign in to comment.