File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ All notable changes to PyResolvers will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 2.4.1] - 2025-01-11
9+
10+ ### Added
11+ - Added ` --version ` and ` -V ` flags to display installed version
12+
813## [ 2.4.0] - 2025-01-11
914
1015### Changed
Original file line number Diff line number Diff line change 1- __version__ = '2.4.0 '
1+ __version__ = '2.4.1 '
22
Original file line number Diff line number Diff line change @@ -171,6 +171,8 @@ def parse(self, argv):
171171 @staticmethod
172172 def setup_parser ():
173173 """Setup argument parser."""
174+ from pyresolvers .lib .core .__version__ import __version__
175+
174176 parser = ArgumentParser (
175177 prog = 'pyresolvers' ,
176178 description = 'High-Performance Async DNS Resolver Validator & Speed Tester' ,
@@ -191,6 +193,12 @@ def setup_parser():
191193 formatter_class = lambda prog : RawDescriptionHelpFormatter (prog , max_help_position = 35 , width = 100 )
192194 )
193195
196+ parser .add_argument (
197+ '--version' , '-V' ,
198+ action = 'version' ,
199+ version = f'%(prog)s { __version__ } '
200+ )
201+
194202 # INPUT OPTIONS
195203 input_group = parser .add_argument_group ('Input Options' )
196204 targets = input_group .add_mutually_exclusive_group (required = False )
You can’t perform that action at this time.
0 commit comments