Skip to content

Commit

Permalink
Rev: no DNRY unfortunately.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Jul 13, 2024
1 parent c63a22f commit 0c07ea0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions octoprint_octorelay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ def input_polling(self):
self.update_ui()
break

# pylint: disable=wrong-import-position
from ._version import __version__, __plugin_pythoncompat__
__plugin_pythoncompat__ = ">=3.9,<4" # see also setup.py
__plugin_implementation__ = OctoRelayPlugin()

__plugin_hooks__ = {
Expand All @@ -383,3 +382,6 @@ def input_polling(self):
"octoprint.comm.protocol.atcommand.sending":
__plugin_implementation__.process_at_command
}

# pylint: disable=wrong-import-position
from ._version import __version__
1 change: 0 additions & 1 deletion octoprint_octorelay/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def get_version_from_git_archive(version_info):


__version__ = get_version()
__plugin_pythoncompat__ = ">=3.9,<4"

# The following section defines a 'get_cmdclass' function
# that can be used from setup.py. The '__version__' module
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def get_version_and_cmdclass(pkg_path):
spec = spec_from_file_location("version", os.path.join(pkg_path, "_version.py"))
module = module_from_spec(spec)
spec.loader.exec_module(module)
return module.__version__, module.__plugin_pythoncompat__, module.get_cmdclass(pkg_path)
return module.__version__, module.get_cmdclass(pkg_path)

miniver_version, python_compatibility, cmdclass = get_version_and_cmdclass(r"octoprint_octorelay")
miniver_version, cmdclass = get_version_and_cmdclass(r"octoprint_octorelay")

########################################################################################################################
# Do not forget to adjust the following variables to your own plugin.
Expand Down Expand Up @@ -76,7 +76,7 @@ def get_version_and_cmdclass(pkg_path):
# Example:
# plugin_requires = ["someDependency==dev"]
# additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]}
additional_setup_parameters = { "python_requires": python_compatibility }
additional_setup_parameters = { "python_requires": ">=3.9,<4" } # see also __init__.py

########################################################################################################################

Expand Down

0 comments on commit 0c07ea0

Please sign in to comment.