|
1 | | -''' |
| 1 | +""" |
2 | 2 | Handle the version information here; you should only have to |
3 | 3 | change the version tuple. |
4 | 4 |
|
5 | 5 | Since we are using twisted's version class, we can also query |
6 | 6 | the svn version as well using the local .entries file. |
7 | | -''' |
| 7 | +""" |
8 | 8 |
|
9 | 9 |
|
10 | 10 | class Version(object): |
11 | 11 |
|
12 | 12 | def __init__(self, package, major, minor, micro, pre=None): |
13 | | - ''' |
| 13 | + """ |
14 | 14 |
|
15 | 15 | :param package: Name of the package that this is a version of. |
16 | 16 | :param major: The major version number. |
17 | 17 | :param minor: The minor version number. |
18 | 18 | :param micro: The micro version number. |
19 | 19 | :param pre: The pre release tag |
20 | | - ''' |
| 20 | + """ |
21 | 21 | self.package = package |
22 | 22 | self.major = major |
23 | 23 | self.minor = minor |
24 | 24 | self.micro = micro |
25 | 25 | self.pre = pre |
26 | 26 |
|
27 | 27 | def short(self): |
28 | | - ''' Return a string in canonical short version format |
| 28 | + """ Return a string in canonical short version format |
29 | 29 | <major>.<minor>.<micro>.<pre> |
30 | | - ''' |
| 30 | + """ |
31 | 31 | if self.pre: |
32 | 32 | return '%d.%d.%d.%s' % (self.major, self.minor, self.micro, self.pre) |
33 | 33 | else: |
34 | 34 | return '%d.%d.%d' % (self.major, self.minor, self.micro) |
35 | 35 |
|
36 | 36 | def __str__(self): |
37 | | - ''' Returns a string representation of the object |
| 37 | + """ Returns a string representation of the object |
38 | 38 |
|
39 | 39 | :returns: A string representation of this object |
40 | | - ''' |
| 40 | + """ |
41 | 41 | return '[%s, version %s]' % (self.package, self.short()) |
42 | 42 |
|
43 | 43 |
|
44 | | -version = Version('pymodbus', 1, 4, 0, "rc1") |
45 | | - |
| 44 | +version = Version('pymodbus', 1, 4, 0, "rc2") |
46 | 45 |
|
47 | 46 |
|
48 | 47 | version.__name__ = 'pymodbus' # fix epydoc error |
49 | 48 |
|
50 | | -#---------------------------------------------------------------------------# |
| 49 | +# --------------------------------------------------------------------------- # |
51 | 50 | # Exported symbols |
52 | | -#---------------------------------------------------------------------------# |
| 51 | +# --------------------------------------------------------------------------- # |
| 52 | + |
53 | 53 | __all__ = ["version"] |
0 commit comments