Skip to content

Commit

Permalink
Merge pull request #1891 from MyreMylar/pylint-version
Browse files Browse the repository at this point in the history
Corrects two pylint warnings in version module
  • Loading branch information
illume committed Jun 3, 2020
2 parents fe19766 + 8140850 commit 0714244
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion buildconfig/version.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ releases. (hmm, until we get to versions > 10)
from pygame.base import get_sdl_version

class SoftwareVersion(tuple):
"""
A class for storing data about software versions.
"""
__slots__ = ()
fields = 'major', 'minor', 'patch'
def __new__(cls, major, minor, patch):
Expand All @@ -53,4 +56,4 @@ class SDLVersion(SoftwareVersion):
"""

_sdl_tuple = get_sdl_version()
SDL = SDLVersion(_sdl_tuple[0],_sdl_tuple[1],_sdl_tuple[2])
SDL = SDLVersion(_sdl_tuple[0], _sdl_tuple[1], _sdl_tuple[2])
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ def write_version_module(pygame_version, revision):
header = header_file.read()
with open(os.path.join('src_py', 'version.py'), 'w') as version_file:
version_file.write(header)
version_file.write('ver = "' + pygame_version + '"\n')
version_file.write('ver = "' + pygame_version + '" # pylint: disable=invalid-name\n')
version_file.write('vernum = PygameVersion(%s)\n' % vernum)
version_file.write('rev = "' + revision + '"\n')
version_file.write('rev = "' + revision + '" # pylint: disable=invalid-name\n')
version_file.write('\n__all__ = ["SDL", "ver", "vernum", "rev"]\n')

write_version_module(METADATA['version'], revision)
Expand Down

0 comments on commit 0714244

Please sign in to comment.